this is one of the Standards problems , i don't believe there is any solution in O(n) best solution from wiki also have complexity O(nlog(n)) http://en.wikipedia.org/wiki/Longest_increasing_subsequence

how did you made this criteria..search O(n) & space O(1) ,


On 28-03-2011 18:37, Kunal Patil wrote:
@Bittu:
Can you elaborate more how Constructing BST (I hope it stands for Binary Search Tree) would be o(n)...
I think It would also be  O(nlog(n))...
My xplanation:
Single element can be inserted in BST in O(log n)
So inserting n elements would be n * O(log n) --> O(n log n) ....

So as per me your solution is also not correct...
correct me if I'm wrong somewhere !!!
--
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 group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.


--
Thanks & Regards
Rajesh Patidar

--
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 group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

<<inline: signature.png>>

Reply via email to