can be done in NlogN take a node, say 'a' check if k-a exists in the tree(logN)
On Sat, Jul 16, 2011 at 7:58 PM, sourabh jakhar <[email protected]>wrote: > convert into doubly linked list and than apply simple algo of finding two > element with a sum > > > On Sat, Jul 16, 2011 at 7:54 PM, saurabh singh <[email protected]>wrote: > >> Check >> https://groups.google.com/group/algogeeks/browse_thread/thread/e8735bcdbf4c956/c49018d0eac8070b?hl=en&lnk=gst&q=saurabh8c#c49018d0eac8070b >> >> >> On Sat, Jul 16, 2011 at 7:50 PM, noobcoder <[email protected]> wrote: >> >>> Given a BST containing integers, and a value K. You have to find two >>> nodes that give sum = K. >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Algorithm Geeks" group. >>> To post to this group, send email to [email protected]. >>> To unsubscribe from this group, send email to >>> [email protected]. >>> For more options, visit this group at >>> http://groups.google.com/group/algogeeks?hl=en. >>> >>> >> >> >> -- >> Saurabh Singh >> B.Tech (Computer Science) >> MNNIT ALLAHABAD >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> > > > > -- > SOURABH JAKHAR,(CSE)(3 year) > ROOM NO 167 , > TILAK,HOSTEL > 'MNNIT ALLAHABAD > > The Law of Win says, "Let's not do it your way or my way; let's do it the > best way." > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
