Skip to content

Latest commit

 

History

History
122 lines (75 loc) · 3.7 KB

index.md

File metadata and controls

122 lines (75 loc) · 3.7 KB

Index of array

Find Permuatation of a given word.

Find Common elements in three array given that all three arrays are sorted

Given an array containing only 0s, 1s and 2s in a random order, arrange the array such that all 0s come before 1s which in turn come before all 2s

Input - [1,2,0,1,2,1,0,1,2,1,0]

Output - [0,0,0,1,1,1,1,1,2,2,2]

Divide an array into three parts and sum all three parst must be same.

Performing binary search on a finite array

Find out the largest element in an array

Rotate an array for given number such that the number goes to the end of array

input=[1,2,3,4,5] rotate around

output= [4,5,1,2,3]

find missing number between smallest and largest number in array which are not present in array

input=[1,1,1,4] output=[2,3]

Find three largest numbers from an array

Find three elements of an array whose sum is eqaul to a given value

Given an array move all zeros in arrays to the end.

Find the index of element whose right element when added give the same value.

find out the common elements from two arrays

Find out maximium sum of any three elements for a given array

For a given array return an array that contains square of elements.

Find a number in the array such that all the elements in the array are divisible by it

Find an element in an array which has most occurences

Find if sum of any elements in array is eqaul to a given number

Implement Quick Sort algorithm

Quicksort Running Time: Quick sort average case is O(n log n) each level takes O(n) but splitting the data is O(log n) O(n) * O(log n) = O(n log n) Worse case is O(log n2) if pivot is smallest value, each level is O(n) and splitting the data is O(n) O(n) * O(n) = O(n2)

Perform Union operations on two arrays

Given an array A of non-negative integers, return an array consisting of all the even elements of A, followed by all the odd elements of A.

Find duplicate in an array of integers given that the integers are in random order and not necessarily each integer i is 0 <= i <= N where N = length of array

find the product of all elements in an array

Placing elements at right position in an array

Find out highest sum of three numbers in an array

Counts max number of one's in an array

Implementation of Kadane Algorithm