Flipkart Interview Question for Senior Software Development Engineers
- 0of 0 votes
I/P: Binary Tree- poorna.chandra.akp February 12, 2014 in India for digital
O/P: Print the all pairs which do not follow BST property.
8 5 12 17
Looks like formatting is screwed for the binary tree.
o/p: (8,2) (8,5) (8,7) (13,5) (13,7) (13,12) (19,17) (21,17) (46,17) (46,21)
I told the interview that I would store the inorder traversal of the input binary tree to an array and print out the inversions.
By inversion, I mean if i<j and then if a[i] > a[j]
| Report Duplicate | Flag | PURGE
Flipkart Senior Software Development Engineer
Interview Type: Phone Interview
Open Chat in New Window