Great work! Now that we have a basic structure of our Queue, let’s test its abilities! To be able to retrieve the head, or tail, or see the output from any of the functions we’ve built, we’ve added conformance to CustomStringConvertible so that you can print queue directly.


Enqueue, dequeue, and peek at elements to see your queue in action! Once you’ve seen how the methods work, click on the “Up Next” button.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?