[algogeeks] Re: SubStringsCount

2006-03-26 Thread Mohammad Moghimi
Can you describe more? or is it possible to send me your code?On 3/26/06, adak [EMAIL PROTECTED] wrote:Does this sound right to you?Out of the string of 4 letters ABAB, the two on the left (only, since we're working from left to right in this example), are original. Sothese two letters are the

[algogeeks] Re: DataStructure - Push,Pop Find_Min in O(1)

2006-03-26 Thread [EMAIL PROTECTED]
@Prunthaban.. Could you please explain your method a little better. Does it work for the following simulation. push --- 4, 5, 6, 1, 3, 2 pop pop find_min pop find_min pop find_min --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

[algogeeks] Re: DataStructure - Push,Pop Find_Min in O(1)

2006-03-26 Thread Prunthaban Kanthakumar
You can't sort using push-pop-findmin. @rajivmat push --- 4, 5, 6, 1, 3, 2- minarray = {0,3}pop -- 4, 5, 6, 1, 3 - minarray = {0,3}pop -- 4, 5, 6, 1- minarray = {0,3}find_min = 3rd element = 1pop -- 4, 5, 6 - minarray{0} =(Now top = mintop so minarray is also popped) find_min = 0th element = 4pop