- Print diagonals of matrix
- reverse words of string without affecting special characters
- Given a sorted array/list 1,1,2,3,4,4,4,5,5,5,5 Find the consecutive pair with max occurrence. In this case 4 and 5
- Given an csv containing id, name, manager_id. Find all employees who directly or indirectly reports to a given manager.
Input: manager id
output: names of all the direct or indirect reporters
- Find max profit by buying and selling an item, prices are given as input: {1, 20, 2, 40, 60, 5, 10}
ans: profit: 59
- Find median of 2 sorted lists
- Find next greater palindrome number
input: 1234
output: 1331