Logo Mina san coding
Logo Inverted Logo
  • Posts
  • Tech
    • Obsidian sync
  • Computer Science
    • Introduction
    • Algorithms
      • Recursion
    • Basic
      • Call Stack
      • Function Call
    • Data Structure
      • Stack
Hero Image
Stack

Use case Computer use stack internally called the call stack. The example of function call Actions Push: Add a new item to the top Pop: Remove the topmost item and read it function Stack(){ let items = []; this.push = function(item){ items.push(item); } this.pop = function(){ return items.pop(); } this.peek = function(){ return items[items.length-1]; } this.isEmpty = function(){ return items.length ==0; } this.clear = function(){ items = []; } this.

June 13, 2020 Read
Navigation
  • About
  • Skills
  • Experiences
  • Education
  • Projects
  • Recent Posts
  • Accomplishments
Contact me:
  • Email: mp922352612@gmail.com

Toha Theme Logo Toha
© 2021 Copyright.
Powered by Hugo Logo