You are on page 1of 2

Questions for next class - 21-01-2017

Recursion -
1- Factorial N
2- XpowerY
3- Ways to .. reach nth ladder by jumps; to score N by(1,2,4,6) ; to
have currency N by various notes
4- merge 2 sorted linked list
5- reverse linked list pairwise
6- print all string with valid parentheses n left and n right
6a- print all string with n 0’s and n 1’s
6b- print all n digit numbers with 1 surplus prefix

Easy Questions
1- Find common elements in 2 arrays.
2- Find if string has repetition
3- Remove repetition in sorted array
3- Check if string permutation could be a palindrome.
4- Time to alert all posts
5- Remove a letter X from a string
6- Replace a letter X by string “abc” in a string
7- Reverse all words in a sentence
8- Find largest size substring which is a palindrome
9- Max stock benifit
10- Find node where 2 list are merging
11- Douch flag(even, odd)
12- French flag(negative, even, odd)
13- Find if one number is replacing other number in a Array
having 1st N numbers
14- Find if Pair exist with sum K
15- Rotate an array by i position
16- Find if an string is rotation of other
17- Row with maximum 1’s followed by 0’s
18- There are two sorted arrays. First one is of size m+n containing
only m elements in left side.
19- Find repeated numbers range 0 to N-1
20- Find 1st missing number

Moderate-
0- Array with max subarray sum (n3 -> n2 -> n)
1- rain water
2- largest rectangle in histogram
3- pascal tringle
4- next larger number which is a palindrome

Puzzles:
1- Write numbers on 2nd dice
2- no of handshakes of spouse for 5 couple party if husband has 4
handshake

You might also like