- print triangle pattern
- print diamond pattern
- print hollow square pattern
- print reverse triangle pattern
- print pyramid pattern
- max element in array
- second max element in array
- check if array is sorted
- count number of elements that have at least one element greater than itself
- find unique element in array
- find missing number in array
- max sum of sub array
- print all sub arrays
- Remove Duplicates from Sorted Array
- move all zeros to end of array
- find sub array with given sum
- rotate array by one
- rotate array by given number
- leaders in array (question: 16 17 4 3 5 2, answer: 17 5 2)
- maximum difference between two elements in array such that larger element appears after smaller element
- stock buy sell to maximize profit
- max consecutive ones in binary array
- maximum length even odd sub array
- equilibrium index
- find a sub array of size k with the least average
- 3 sum
- sum of digits of a number
- power of a number
- fibonacci series
- armstrong number (question: 153 = 1^3 + 5^3 + 3^3)
- print all divisors of a number
- GCD of two numbers
- count number of digits in a number
- check if a number is prime or not
- check if a number is palindrome or not
- count trailing zeros in factorial of a number
- matrix row sum
- matrix column sum
- rotate matrix by 90 degree
- Stack implementation using array
- reverse a string using stack
- parenthesis matching using stack
- Queue implementation using array
- linear search
- binary search
- square root of a number
- return indices of two numbers whose sum is equal to given number
- find first and last occurrence of a number in sorted array
- search in rotated sorted array
- count number of occurrences in sorted array
- search in infinite sorted array
- given a number, set its i'th bit
- given a number, clear its i'th bit
- given a number, toggle its i'th bit
- given a number, check if its i'th bit is set or not
- given a number, count number of set bits
- given array of numbers, every number occurs twice except one, find that number
- bubble sort
- selection sort
- insertion sort
- merge sort
- quick sort
-
- merge Two sorted array
- intersection of two sorted array
- union of two sorted array
- print numbers from n to 1
- print numbers from 1 to n
- power of a number
- print binary form of a number
- reverse a string
- array sum using recursion
- flatten array using recursion
- string palindrome using recursion
- string permutation
- array permutation
- Given m, n count number of ways to reach from (0, 0) to (m, n) in a matrix
- letter combination of a phone number
- find the first index if element in array or -1 if not present
- find the last index if element in array or -1 if not present
- get all subsequences of a string
- generate parenthesis
- decode ways
- given a rope of length n, find the maximum number of pieces you can make such that the length of each piece is in set {a, b, c}
- maxPieces
- tower of hanoi
- K-th Symbol in Grammar
- Find the Winner of the Circular Game
- find pair of elements in array whose sum is equal to given number
- Find first non-repeating character of given String
- Remove duplicates from Array
- Intersection of Two Arrays
- check if arr[i] + arr[j] = arr[k] + arr[l]
- count number of sub arrays sum equals k
- Singly Linked List implementation
- Doubly Linked List implementation
- Circular Linked List implementation
- insert node in BST
- in order traversal
- pre order traversal
- post order traversal
- level order traversal
- search node in BST
- height of BST
- balanced BST
- string permutation
- Maximum Length of a Concatenated String with Unique Characters
- pair of elements in sorted array whose sum is equal to given number
- count number of connective numbers that equal to num
- sort array of 0s & 1s