---
title: "Riya Varyani (@riyavaryani) | Hashnode"
description: "Learner | Software Engineer 👩🏻‍💻. Read the latest articles by Riya Varyani on Hashnode."
url: "https://hashnode.com/@riyavaryani"
---

@riyavaryani

# Riya Varyani

@riyavaryani · Bangalore · Joined April 2023

Learner | Software Engineer 👩🏻‍💻

### [Moore Voting Algorithm](https://riyavaryani.hashnode.dev/moore-voting-algorithm?utm_source=hashnode&utm_medium=feed)

Suppose you are given an array of size n consisting of integers and you have to find the majority element which appears more than n/2 times. Of course, the very first approach which will come to our mind is to sort the array and return the middle e...

3 min read · [riyavaryani.hashnode.dev](https://riyavaryani.hashnode.dev/moore-voting-algorithm?utm_source=hashnode&utm_medium=feed)

[2](https://hashnode.com/posts/moore-voting-algorithm/64a310ccc51dcd55f4146d60) [Jul 3, 2023](https://hashnode.com/posts/moore-voting-algorithm/64a310ccc51dcd55f4146d60)
