0% found this document useful (0 votes)
13 views2 pages

Stack, Queue, and Heap Problems Guide

The document discusses data structures like stack, queue and heap. It provides implementation details and problems on stack like implementing stack class, reversing a string and checking balanced parentheses. For queue, it discusses implementing queue class and circular queue. For heap, it covers max heap, min heap, heap sort and finding maximum of all subarrays of size k.

Uploaded by

Anonymous Geek
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views2 pages

Stack, Queue, and Heap Problems Guide

The document discusses data structures like stack, queue and heap. It provides implementation details and problems on stack like implementing stack class, reversing a string and checking balanced parentheses. For queue, it discusses implementing queue class and circular queue. For heap, it covers max heap, min heap, heap sort and finding maximum of all subarrays of size k.

Uploaded by

Anonymous Geek
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Stack,

Queue and Heap


Basic Level Questions:

Stack:
• Implement a Stack Class with the following methods:
o push()
o pop()
o peek()
o empty()
o search()
[Follow here: [Link] ]
• Reverse a String using Stack
[Follow here: [Link] ]
• Check the expression has valid or Balanced parenthesis or not.
[Follow here: [Link] ]
• Implement two Stacks in an array
[Follow here: [Link] ]

Queue:
• Implement a Queue class(using arrays) with the following
methods:
o enqueue()
o dequeue()
o front()
o display()
[Follow here: [Link] ]
• Implement a Circular queue with the same methods in the
above problem statement
[Follow here: [Link]
implementation/ ]
• Implement a Deque (Doubly Ended Queue) with insertion and
deletion allowed at both the ends.
[Follow here: [Link] ]


Heap:
• Implement a Maxheap using arrays and recursion.
[Follow here: [Link] ]
• Implement a Minheap using arrays and recursion.
[Follow here: [Link] ]
• Sort an Array using heap. (HeapSort)
[Follow here: [Link] ]
• Maximum of all subarrays of size k.
[Follow here: [Link]
subarrays-of-size-k/ ]

You might also like