@all i think c is also invalid since after 7 how 4 can popped
with out poping 6 and 5
--
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,
explanation for *b)*
push(0)
push(1)
push(2)
push(3)
push(4)
pop()---4
push(5)
push(6)
pop()-6
push(7)
push(8)
pop()-8
pop()7
pop()5
pop()-3
pop()2
push(9)
pop()--9
here, noway we can get 0 before 1 .. so this sequence is not
possible.
I DNT GET IT.. EXPLAIN PROPERLY ANYONE
On Wed, Aug 31, 2011 at 12:57 PM, Yuchen Liao wrote:
> The sequence like 3 1 2 is invalid.
>
> So, ans is *b*,* f* and *g*
>
>
> On Wed, Aug 31, 2011 at 1:35 AM, Siddhartha Banerjee <
> thefourrup...@gmail.com> wrote:
>
>> couldn't get it... what are the se
The sequence like 3 1 2 is invalid.
So, ans is *b*,* f* and *g*
On Wed, Aug 31, 2011 at 1:35 AM, Siddhartha Banerjee <
thefourrup...@gmail.com> wrote:
> couldn't get it... what are the sequences given in options??? are they the
> pushed values or popped values or what???
>
> --
> You received th
couldn't get it... what are the sequences given in options??? are they the
pushed values or popped values or what???
--
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 unsubscri
b f g
On Wed, Aug 31, 2011 at 11:49 AM, shiva wrote:
> Suppose that a client performs an intermixed sequence of (stack) push
> and pop operations. The push operations put the integers 0 through 9
> in order on to the stack; the pop operations print out the return
> value. Which of the following
Suppose that a client performs an intermixed sequence of (stack) push
and pop operations. The push operations put the integers 0 through 9
in order on to the stack; the pop operations print out the return
value. Which of the following sequences could not occur?
(a) 4 3 2 1 0 9 8 7 6 5
(b) 4 6 8 7 5