HackerRank - Queue Using Two Stacks | Full Solution with Examples and Visuals | Study Algorithms

preview_player
Показать описание
You are required to replicate the operations of a queue, using only the provided two stack data structures. The implemented could should support functions like enqueue, dequeue, head, and isEmpty. Watch this video to see a live demo of how this solution can be implemented. You don't have different ways to implement this but you can come up with a solution with intuition. Watch the video to understand the problem in a simplified manner. I then work along with you to solve it in an efficient manner. All along with visuals and explanations.

00:00 - Intro
01:42 - Problem Statement and Test Cases
03:55 - Demo of the solution
11:56 - Dry-run of code
15:35 - Final thoughts

📚 Links I talk about in the video:

Actual problem on HackerRank:

Code on Github:

Test cases on GitHub:

📘 A text based explanation is available at:

💻 Get Social 💻

#hackerrank #programming #interview
Рекомендации по теме
Комментарии
Автор

None of the lecture is available on YouTube which has such kind of explanation.
I really appreciate the way you explain. I would say, "Teaching is an art and you are the great artist."
Thanks!

Abhay.Bhandari
Автор

this video deserves more likes, you made it easy to understand

pasej
Автор

Crystal clear explanation sir
Thank you so much

suhas
Автор

it was a more efficient way than i thought

mrhuntsman
Автор

I usually don't comment on videos, But after your explanation I just couldn't hold back. Great job, Thanks!!

varun_
Автор

You are damn good on how simply you explain the problem, i really appretiate you.
Make such type of videos

rishabhmehra
Автор

This was an amazing explanation, Nikhil. Thank you

brinderdhaliwal
Автор

Bro first time I'm commenting on any video
This is the best best best explanation in very less time 👌👌
Keep it up... 👍👍

pradeepjaiswal
Автор

Damn ! You're so Good Bro, Great Content and High Quality Explanation.

rohitsaka
Автор

gosh i really needed your channel, where were you this whole time!

sdkaraarslan
Автор

Dude you're great! Very good teaching, thank you <3

zencither
Автор

Does this mean that we simply have to display the elements of the queue using two stacks? Means the output stack should read the same elements as that of the queue right?

shreyamatade