-
Notifications
You must be signed in to change notification settings - Fork 4
Array
Suyash Soni edited this page Mar 11, 2018
·
20 revisions
- To reverse an array
- To rotate an array by 'd'
- To find out Pair(s) with given sum 's' in sorted array
- To find out Pair(s) with given sum 's' in unsorted array
- Rearrange numbers in array such that +ve & -ve numbers are placed alternatively
- Move all -ve numbers to the left and +ve numbers to the right in array
- Segregate 0's & 1's in an array
- Segregate 0's, 1's & 2's in an array (Dutch national flag algorithm)
- Rearrange an array in max-min form, i.e. 1st max, 1st min, 2nd max, 2nd min
- The longest sub-array having equal numbers of 0s and 1s
- Maximum product sub-array & minimum product sub-array
- Form largest number by re-arranging array elements
- Find element in row-wise & col-wise sorted matrix
- Given prices in increasing order of time, buy, sell & maximize profit
- Find zeroes to be flipped so that number of consecutive 1’s is maximized
- All combinations of input sequence
- All permutations of input sequence
- Predecessor in sorted array
- Next greater elements
- Next greatest elements
- Checks if number is prime
- Fibonacci Series
- Factorial of a number
- Leader(s) in array
- Majority element - Moore's voting algorithm
- Minimum from Stack in constant O(1) time
- Minimum steps to reach a destination
- Stock-Span problem
- Median of two sorted arrays