Problem Statement: Given an array containing both positive and negative integers, we have to find the length of the longest
Continue readingCategory: Arrays
Find the Majority Element that occurs more than N/2 times
Problem Statement: Given an array of N integers, write a program to return an element that occurs more than N/2
Continue readingnext_permutation : find next lexicographically greater permutation
Problem Statement: Given an array Arr[] of integers, rearrange the numbers of the given array into the lexicographically next greater
Continue readingTwo Sum : Check if a pair with given sum exists in Array
Problem Statement: Given an array of integers arr[] and an integer target. 1st variant: Return YES if there exist two
Continue readingSort an array of 0s, 1s and 2s
Problem Statement: Given an array consisting of only 0s, 1s, and 2s. Write a program to in-place sort the array
Continue reading