Log in from a computer to take this course

You'll need to log in from a computer to start Introduction to Algorithms and Linear Data Structures in Swift. But you can practice or keep up your coding streak with the Codecademy Go app. Download the app to get started.

apple storegoogle store
Learn

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.

Instructions

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?