Chapter quiz · Foundations

Test what you learned.

8 questions on Foundations. Pass 70% to clear the chapter.

← Review chapter lessons

Quiz

Foundations — Chapter Quiz

Eight questions on Big-O, complexity classes, amortized analysis, space complexity, and JS engine internals.

0/ 9
  1. Question 1
    1

    What is the Big-O time complexity of accessing an element by index in a JavaScript array?

  2. Question 2
    2

    Which best describes amortized O(1) for Array.push?

  3. Question 3
    3

    What distinguishes a 'packed' array from a 'holey' array in V8?

  4. Question 4
    4

    When calculating the space complexity of a recursive function with depth d, what is the minimum extra space used?

  5. Question 5
    5

    Which complexity class grows fastest for large n?

  6. Question 6
    6

    In JavaScript, objects are passed by value, so mutating a parameter inside a function never affects the caller's object.

  7. Question 7
    7

    The notation that describes the exact tight bound on an algorithm's growth — neither just an upper nor just a lower bound — is called ___ notation.

  8. Question 8
    8

    Which of the following are common benchmarking pitfalls in Node.js? (Select all that apply)

    Select all that apply.

Pick an answer — instant feedback as you go.