×
Home Discussions Write at Opengenus IQ
×
  • DSA Cheatsheet
  • HOME
  • Track your progress
  • Deep Learning (FREE)
  • Join our Internship 🎓
  • RANDOM
  • One Liner
Shreya Shah

Shreya Shah

Intern at OpenGenus, B. Tech Student at Jabalpur Engineering College (JEC) in Information Technology, 2023.

Jabalpur, Madhya Pradesh •
11 posts •
Algorithms

Boyer Moore majority vote algorithm [Majority Element]

Boyer Moore voting algorithm is used to find the majority element among the given sequence of elements which occurs more than N/2 times, in linear time complexity and constant space complexity.

Shreya Shah Shreya Shah
Algorithms

Number of rectangles from a given set of points

We have discussed how to find the number of rectangles (parallel to the axes) possible from a given set of coordinate points.

Shreya Shah Shreya Shah
Algorithms

Factorial of large numbers

Factorial of a non-negative number n, denoted by n!, is the product of all positive numbers less than or equal to n. With the usual approach, we can compute factorial only till 20! due to size limitation of data type. We have present how to overcome this limitation.

Shreya Shah Shreya Shah
Algorithms

K-th Smallest element in a row and column wise sorted matrix

We have discussed how can we find the kth smallest element in a given n x n matrix, in which every row and column is sorted in non-decreasing order and covered 3 approaches: brute force, using min-heap and using Binary Search.

Shreya Shah Shreya Shah
Algorithms

Types of views in Binary tree

We have explored the different types of views of the binary tree (like Left, Right, Top and Bottom View) and discussed how to find them.

Shreya Shah Shreya Shah
Algorithms

Median in stream of running integers [Explained 3 Algorithms]

Given that integers are being read from a data stream, we need to find the median of all the elements read so far starting from the first integer till the last integer. This is called the Median in Running stream of Integers.

Shreya Shah Shreya Shah
String Algorithms

Number of palindromic substrings in a string

A string is a palindrome when it reads the same backward as forward and a substring is a contiguous sequence of characters within the string. We have discussed multiple approaches to find the number of palindromic substrings in a given string.

Shreya Shah Shreya Shah
Algorithms

Minimum Comparisons to find Second Largest Element

In this article, we have demonstrated the mathematical analysis to find out the minimum number of Comparisons to find the second largest or the second smallest element.

Shreya Shah Shreya Shah
Algorithms

Time & Space Complexity of Counting Sort

In this article, we have explained the time complexity of Counting Sort for Average case, Worst case and Best case and also, covered the space complexity using Mathematical analysis.

Shreya Shah Shreya Shah
List of Mathematical Algorithms

Equilibrium Index: Find index such that sum of left sub-array = right sub-array

For a given array, we need to find an index such that sum of left sub-array = right sub-array also called the Equilibrium Index. We solve this using brute force approach O(N^2) and using prefix array in linear O(N) time.

Shreya Shah Shreya Shah
Software Engineering

endl vs \n (New Line) in C++

In C++, endl and /n are used to break lines or move the cursor to a new line. Both endl and \n may seem to be similar but has distinct differences which we have explored in this article in depth.

Shreya Shah Shreya Shah
OpenGenus IQ © 2025 All rights reserved â„¢
Contact - Email: team@opengenus.org
Primary Address: JR Shinjuku Miraina Tower, Tokyo, Shinjuku 160-0022, JP
Office #2: Commercial Complex D4, Delhi, Delhi 110017, IN
Top Posts LinkedIn Twitter
Android App
Apply for Internship