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

Veröffentlicht am: 22 January 2021
auf dem Kanal: Nikhil Lohia
12,483
311

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:
Queue Data Structure:    • Queue Data Structure explained with a...  
Stack Data Structure:    • Stack Data Structure explained with a...  

Actual problem on HackerRank:
https://www.hackerrank.com/challenges...

Code on Github:
https://github.com/nikoo28/java-solut...

Test cases on GitHub:
https://github.com/nikoo28/java-solut...

📘 A text based explanation is available at:
https://studyalgorithms.com/array/que...

🔗 To see more videos like this, you can show your support on: https://www.buymeacoffee.com/studyalg...

💻 Get Social 💻
Follow on Facebook at:   / studyalgos  
Follow on Twitter at:   / studyalgorithms  
Follow on Tumblr at:   / studyalgos  
Subscribe to RSS feeds: https://studyalgorithms.com/feed/
Join fan mail: http://eepurl.com/g9Dadv

#hackerrank #programming #interview


Auf dieser Seite können Sie das Online-Video HackerRank - Queue Using Two Stacks | Full Solution with Examples and Visuals | Study Algorithms mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Nikhil Lohia 22 January 2021 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 12,483 Mal angesehen und es wurde von 311 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!