Skip to content
Sabaqاردو

Stack and Queue Problems for Interviews (take U forward)

By take U forward

Course audio
Course audio: English
Level
Intermediate
Length
19 lessons · 7.2 hours

What you'll be able to do

  • Implement stacks and queues and check balanced parentheses
  • Use monotonic stacks for next greater and smaller element problems
  • Solve histogram, trapping rain water and sliding window maximum
  • Design LRU and LFU caches

About this course

This language-independent English series has 19 videos and about 7.2 hours on stacks and queues for coding interviews. It begins with an introduction and implementations, then balanced parentheses and prefix, infix and postfix conversion. Core monotonic-stack problems follow: min stack, next greater element I and II, previous smaller element, trapping rain water, sum of subarray minimums and ranges. Harder lessons include asteroid collisions, largest rectangle in a histogram, maximal rectangle, removing K digits, stock span, sliding window maximum and the celebrity problem. The series ends with LRU and LFU cache design. It suits learners who know arrays and basic data structures and want interview practice.

Before you start: Arrays and basic programming in any language

Syllabus

19 lessons · 7:09:48 in total

  1. 1L1. Introduction to Stack and Queue | Implementation using Data Structures1:05:06
  2. 2L2. Check for Balanced Parentheses | Stack and Queue12:28
  3. 3L3. Prefix, Infix, and Postfix Conversion | Stack and Queue Playlist50:47
  4. 4L4. Implement Min Stack | Stack and Queue Playlist20:55
  5. 5L5. Next Greater Element | Stack and Queue Playlist18:25
  6. 6L6. Next Greater Element - II | Stack and Queue Playlist15:41
  7. 7L7. Previous Smaller Element | Stack and Queue Playlist8:11
  8. 8L8. Trapping Rainwater | 2 Approaches | Stack and Queue Playlist28:58
  9. 9L9. Sum of Subarray Minimum | Stack and Queue Playlist23:35
  10. 10L10. Sum of subarray ranges | Stack and Queue Playlist10:34
  11. 11L11. Aestroid Collisions | Stack and Queue Playlist17:29
  12. 12L12. Largest Rectangle in Histogram | Stack and Queue Playlist31:42
  13. 13L13. Maximal Rectangle | Stack and Queue Playlist12:12
  14. 14L14. Remove K Digits | Stack and Queue Playlist15:29
  15. 15L15. Stock Span Problem | Stack and Queue Playlist19:21
  16. 16L16. Sliding Window Maximum | Stack and Queue Playlist19:58
  17. 17L17. The Celebrity Problem | Stack and Queue Playlist16:17
  18. 18L18. Implement LRU Cache24:56
  19. 19Implement LFU cache in C++/Java | Leetcode(Hard)17:44

Questions

How long is this course?
It has 19 lessons and about 7.2 hours of video (7:09:48 in total). Your progress is saved lesson by lesson, so you can stop and continue on any device you sign in on, or in the same browser without signing in.
Is this course in English?
The lessons are taught in English. The teacher is take U forward; the videos play from their official YouTube channel, and Sabaq adds the lesson order, progress tracking, notes and the summary on this page.
Who is this course for, and what should I know first?
It is aimed at learners who already know the basics. Before you start: Arrays and basic programming in any language.
Is it free, and do I need an account?
Yes, it is free to watch and no account is needed. The videos are official uploads by the teacher on YouTube; a free DanixSoft account is optional and only syncs your progress between devices.
What should I take after this course?
A good next step on Sabaq is “Algorithms (Abdul Bari)”. The “What to take next” list on this page shows more courses at the same or a higher level in the same topic.

What to take next

Videos by take U forward, played from their official YouTube channel. Subscribe on YouTube

Official upload by the teacher or institution on their own channel, shown with YouTube's embedded player.

Lessons listed from the official YouTube playlist. Full playlist on YouTube

Lessons last checked Nov 2026. Course summary and lesson structure by Sabaq.

Report a problem or a rights request