TheDewarist
BAN USER- 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
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 - 0of 0 votes
Answersif u have a N steps staircase u standing at 1 step now you have options to step up to 2step or you can skip one step and go to 3rd step... so at ith step you have a option to go to i+1 step or i+2 step.. so how many ways you can climb the stairs...??
- TheDewarist| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Math & Computation
its not working....(check for 3)
run code on ur machine first...
they always ask to write a running code on paper. so practice to write a code...
anyone with the code !!
@kolo dude....
its not a circular LL. In circular LL last node always points to the head node.
can you elaborate more !!
- TheDewarist June 05, 2012