This is zigzag problem where in addition to print, one needs to append the
printed data to the resulting DLL at the tail.
Best Regards
Ashish Goel
"Think positive and find fuel in failure"
+919985813081
+919966006652
On Tue, Feb 1, 2011 at 6:12 PM, bittu wrote:
> append(result,head);
--
You
OK Guys problem i Solved ...Let me explain the problem..
1. First of all its not problem of converting BST to Sorted Doubly
Linked List also
2. Not To just Converting BT to DLL
3 .Problem is Neither to Just print The Spiral Order Traversal of BT
Please Read the problem Carefully Before askin
@sankalp the question is to change the Tree to a doubly linked list inplace
not to print
On Tue, Feb 1, 2011 at 9:11 AM, Ashish Goel wrote:
> http://geeksforgeeks.org/?p=3758&cpage=1#comment-1371
>
>
> Best Regards
> Ashish Goel
> "Think positive and find fuel in failure"
> +919985813081
> +9199
http://geeksforgeeks.org/?p=3758&cpage=1#comment-1371
Best Regards
Ashish Goel
"Think positive and find fuel in failure"
+919985813081
+919966006652
On Sun, Jan 30, 2011 at 6:28 PM, sankalp srivastava <
richi.sankalp1...@gmail.com> wrote:
> Spiral order .. means zigzag order for example
>
>
bittu,
you have written this code at end of main()
*printGivenOrder(start);
printList(rslt);*
so the BT in spiral order should be printed twice
But you are getting a extra 4 only in place of the whole tree because of
these lines
*temp=current;
current=head;
rslt=appnd(temp,current);
* There
@bittu: please write the subject which could summarize the problem statement
or give a context instead of writing "top question", "amazon" everywhere.
you have multiple posts with the same problem. In the content you can write
this co., that co., frequency of questions etc etc whatever you like aft
@bittu: you may also want to answer juver++'s off topic question in your
future posts.
On Mon, Jan 31, 2011 at 1:15 AM, saurabh gupta wrote:
> @bittu: please write the subject which could summarize the problem
> statement or give a context instead of writing "top question", "amazon"
> everywhere
Isn't it just a coding question?
@ ^ : your code is not clean enough for anyone to read.
As far as data-structures are concerned... a stack and a queue suffice.
There is no algorithmic issue I can see. So, I guess you should solve these
problems yourself or some programming forum.
For those who
Hi Guys...I think I am right I have written the code for this..please
go through it...& let me know if any issuecheck the ouyouti
have write the solution for the BT of height 2 ..
1
/ \
2 3
/ \ / \
4 5 6 7
its printing 1237654. now it become DLL so
Spiral order .. means zigzag order for example
1
2 3
4 5 6 7
Then , you need to print it in the order
1->2-3->7->6->5->4
Two of my friends were asked this questions in the interview , so I
will list both of the approaches .
1)Use 1 stack and 1 queue .
push the
@bittu
offtopic: could you please tell us why do you use uppercase letters in > 50%
of the words?!
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this grou
11 matches
Mail list logo