हिंदी

Write an algorithm to implement pop operation.

Advertisements
Advertisements

प्रश्न

Write an algorithm to implement pop operation.

अति संक्षिप्त उत्तर
Advertisements

उत्तर

  1. Start.
  2. If top = -1, print Stack Empty and stop.
  3. Store stack[top] as the deleted item.
  4. Decrement top by 1.
  5. Print Item Deleted.
  6. Stop.
shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 6: Stacks & Queues in list - EXERCISE [पृष्ठ १२३]

APPEARS IN

सीबीएसई Computer Science with Python [English] Class 12
अध्याय 6 Stacks & Queues in list
EXERCISE | Q 21. | पृष्ठ १२३
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×