coding180 icon
Coding180

Describe the process for adding and removing items from the stack.

Home > Interviews > PHP


robort - 2022-10-02 03:17:39

Push/Push: 

  • To refer to the following memory allocation, increase the top variable; 
  • Copy the item to the array's top-most index value; 
  • Once the stack is full, repeat steps 1 and 2; 

Pop/Pop: 

  • The top-most element should be saved in another variable; 
  • Decreasing the highest value; 
  • Bring back the first ingredient;

user

Robort Gabriel

Lagos, Nigeria

Freelance Web Developer, Native Android Developer, and Coding Tutor.

Skills
  • UI / UX
  • JavaScript
  • Python
  • PHP
  • Kotlin
  • Java
  • Bootrap
  • Android
  • Laravel