Amazon Interview Report
- 0of 0 votes
AnswersLinked List with following structure..
struct node { int data; struct node *next; struct node *next_larger; }
initially next_larger of every node is point to NULL.
- TheDewarist August 29, 2010
now write a c code which set all node's next_larger pointer.
where next_largest point to the next larger then its own value and largest value node's next_larger pointer points to NULL
i.e.
if LL is 3->1->5->6->4
then 3's next_larger points to 4
and 1's next_larger points to 3
and 5's next_larger points to 6
and 6's next_larger points to NULL
and 4's next_larger points to 5| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Linked Lists
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.