BeginnerAbout 15 min

    Arrays & Lists

    Read the full article on Substack

    5 min read.

    Master the most fundamental data structure - arrays and lists. Learn about random access, sequential operations, and memory layout.

    05
    12
    28
    31
    49
    53

    Press Run to read arr[2].

    Check your understanding

    Answer from memory before you scroll back up. Pulling an idea out of your head is what makes it stay there.

    Cheap or expensive?

    Sort

    Sort each dynamic-array operation by its cost.

    Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.

    O(1)

    Drop items here

    O(n)

    Drop items here
    6 pieces left to place

    Quiz

    20 questions
    Question 1 of 20
    Score: 0

    What is the time complexity of accessing an element in an array by index?

    Done with this lesson?

    Sign in free to keep your progress, streak and quiz scores.

    Keep going