Push and Pop (array impl.) IsEmpty(A : blobstack pointer) : boolean { return A.size = 0 } IsFull(A : blobstack pointer) : boolean { return A.size = A.maxsize; } Pop(A : blobstack pointer) : blob pointer { // Precondition: A is not empty // A.size := A.size – 1; return A.holder[A.size 1]; } Push(A : blobstack pointer, p : blob pointer): { // precondition: A is not full// A.size := A.size 1; A.holder[A.size] := p; - Study24x7
Social learning Network
16 Mar 2019 10:30 AM study24x7 study24x7

Push and Pop (array impl.) IsEmpty(A : blobstack pointer) : boolean { return A.size = 0 } IsFull(A : blobstack pointer) : boolean { return A.size = A.maxsize; } Pop(A : blobstack pointer) : blob pointer { // Precondition: A is not empty // A.size := A.size – 1; return A.holder[...

See more

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles