Thursday, 13 June 2019

Inserting item into a stack algorithm

Inserting item into a stack algorithm



Step1: Start
Step2: if Top=MAX STACK then
                  Print “Overflow”
Step3: set Top=Top+1
Step4: set STACK [Top]=item
Step5: Return

No comments:

Post a Comment