Skip to content

Interview Experience 26

sggarg edited this page Aug 13, 2017 · 1 revision

#SoftwareDeveloper

(1) Pen&Paper-3 questions

a) printing a matrix(odd dimensions) in spiral order starting from the centre of the matrix.

b) a question based on binary search and lower bound function

c) a 24hr time format string is given (eg:11:30). Find the next palindromic time (ans:12:21)

(2) Technical PI

a) check if linked list is palindromic http://www.geeksforgeeks.org/function-to-check-if-a-singly-linked-list-is-palindrome/

b) a linked list comprising of binary digits..arrange the nodes in such a way that all 1's come after 0's. T(n)=O(n) S(n)=O(1) eg: 1->0->0->1 ==0->0->1->1

c) Remove duplicates in a string http://www.geeksforgeeks.org/recursively-remove-adjacent-duplicates-given-string/

d) Print a binary tree level order but starting from leftmost node to rightmost(not from root to leaf) ..I used a map to do this.

e) Sliding window problem (using heap)

(3) Technical PI

(a) questions on OS(process table,process state diagram),virtual memory mapping,paging,cache scheduling..Then he asked me to code LRU cache algorithm) http://www.geeksforgeeks.org/implement-lru-cache/

(b) Remove blank spaces in a string with some conditions eg( " hello world " =="hello world"remove the trailing and the preceding spaces but keep a blank space between words..

(4) HR

project, internship, family background, future plans, willing to relocate to Hyderabad, strength and weaknesses in your subjects, technology likes/dislikes.

Clone this wiki locally