👋 Welcome Gophers! In this challenge, we are going to be implementing some of the basic functionality of the
Queue data structure in Go.
This is going to be the first of a number of data-structure questions which may come in handy if you are about to go in for an interview!
We’ll be carrying on the theme of flying from the previous challenge here and implementing 3 crucial methods needed to support a basic implementation of a Queue.
The first challenge will be to implement the
Push function of our Queue data structure.
This method will take in a Flight and
push the flight onto the back of our
The second part of this challenge will be implementing the
This method will allow us to view what item is at the front of our queue but not modify the underlying stack values.
The third and final part of this challenge will be implementing the
This method will allow us to
pop an element off the front of our
Items queue and return to us the first flight.
See the Solution
Feel free to have a look at the forum discussion thread for this challenge and contribute with your own solutions here - Challenge 06 - Implementing a Queue
If you enjoyed this challenge, you may also enjoy some of the other challenges on this site: