[algogeeks] Re: evaluate expression

2010-08-30 Thread krazee koder
@manjunath: sorry i dont... can u be a bit more elaborate pls??? Thanks and Regards. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email

[algogeeks] evaluate expression

2010-08-29 Thread krazee koder
hi all! You r given numbers from 0-9 and one RESULT (R). you can use operators *,/,-,+,""(concatening nos. like 12,123 etc.) ... You must find the possible expression that yields R. Pls post all possible solns fr this...m totally clueless. -- You received this message because you are subscribed

[algogeeks] Binary tree to LL

2010-08-26 Thread krazee koder
Give all possible methods to flatten a binary tree to a linked list. for eg. 50 / \ 25 60 / \ / \ 530 55 75 should be flattened to 5->25->30->50->55->60->75 PS: note that the tree should be converted to the LL and no separate LL should be formed. -- You

[algogeeks] Re: knight moves in chess

2010-08-25 Thread krazee koder
i think v can solve it by DP technique..similar to LCS prob or assembly line scheduling(Cormen et. al.) consider a two dimensional look up table. Each index refers to shortest distance taken by the knight to move that square. recursively try to call a fn. that changes source to the current square