0
see.... suppose u have an array of 5 space... 4 are filled.. now any 4 can be filled and u can add a value to the remaining void array index... but array push() means...its a stack same as stack / pile of books.. u need to add(if u want) to the top... suppose a book self is there.. filled left to right with remaining 2 positions for 2 books.. so its like u can push 2 books...to that postion... for stack-queue implementation we code the push function...its a idea... it works as code is written.. for stake or queue... only upper position u can add values or datas... ((up to end of array length)) ....... position 6 ....... position 5 --- position 4 --- position 3 --- position 2 --- position 1 --- position 0 suppose this is a stack.. u can first push a data/element/value to the 5 th position then 6 th position.. and then stack is full
27th Oct 2017, 2:09 PM
sayan chandra
sayan chandra - avatar