Turn on thread page Beta

Elements in a stack (pop/push) watch

Announcements
    • Thread Starter
    Offline

    12
    ReputationRep:
    The correct solution for the problem below is 3.

    Name:  pop.jpg
Views: 25
Size:  26.2 KB

    I'd have thought it would go:

    8
    6
    4
    2

    delete 8
    insert 3
    delete 3

    so now have:

    6
    4
    2

    insert 4, 6, 7 then delete these.

    so have:
    6
    4
    2

    So answer of 6. Where have I gone wrong?

    Thanks!
    • Very Important Poster
    Offline

    21
    ReputationRep:
    Very Important Poster
    (Original post by little pixie)
    The correct solution for the problem below is 3.

    Name:  pop.jpg
Views: 25
Size:  26.2 KB

    I'd have thought it would go:

    8
    6
    4
    2

    delete 8
    insert 3
    delete 3

    so now have:

    6
    4
    2

    insert 4, 6, 7 then delete these.

    so have:
    6
    4
    2

    So answer of 6. Where have I gone wrong?

    Thanks!
    I agree, I think the answer is 6 too.
    Offline

    18
    ReputationRep:
    I got 6 too
    Offline

    18
    ReputationRep:
    Name:  Capture.JPG
Views: 17
Size:  42.5 KB
 
 
 
Reply
Submit reply
Turn on thread page Beta
Updated: February 1, 2017

University open days

  • Manchester Metropolitan University
    Postgraduate Open Day Postgraduate
    Wed, 14 Nov '18
  • University of Chester
    Chester campuses Undergraduate
    Wed, 14 Nov '18
  • Anglia Ruskin University
    Ambitious, driven, developing your career & employability? Aspiring in your field, up-skilling after a career break? Then our Postgrad Open Evening is for you. Postgraduate
    Wed, 14 Nov '18
Poll
Should Banksy be put in prison?

The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Write a reply...
Reply
Hide
Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.