jvj.pass
BAN USER
Questions (4)
Comments (2)
Reputation 150
- 0of 0 votes
AnswersIn a shop, product X is available in different quantities q1,q2,q3...... with price tags p1,p2,p3,...
- jvj.pass in India
wap to purchase X of quantity Q such that total price is less and also number of baggage is less
*Consider the cost to be optimum than baggage.
(Sorry the trouble guys, I have edited the ques here)| Report Duplicate | Flag | PURGE
Amazon Software Engineer in Test - 0of 0 votes
AnswersWap to find kth largest element in a binary search tree
- jvj.pass in India| Report Duplicate | Flag | PURGE
Amazon Software Engineer in Test - 0of 0 votes
AnswersGiven a binary tree convert it to doubly linked list, with left pointer of binary tree as prev pointer of doubly linked list and right pointer of binary tree as next pointer of doubly linked list.
- jvj.pass in India
Example:
Input:
Binary tree with
A as root
B left of A
C right of A
B&C have no children
Output:
B->A->C->null
null<-B<-A<-C| Report Duplicate | Flag | PURGE
Amazon Software Engineer in Test
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
the code will print only the nth node from tail.
- jvj.pass April 14, 2013the condition count == k has to be changed to count <= k