Skip to content

[JS v9] Dynamic Programming Review: add problem setup, recurrence complexity, and coin change algorithm #71692

Open
notsoravii/freeCodeCamp
#4

Description

@ShakilUrRehman21

Scope: JavaScript v9 Certification (review-dynamic-programming-js). This is distinct from the Python issue #71530.

Describe the Issue

The JavaScript Dynamic Programming Review (review-dynamic-programming-js) omits core concepts taught in the What Is Dynamic Programming and What Are Some Common Algorithms? JavaScript lecture:

  1. Staircase examples lack problem context: Code begins immediately without stating what n represents (a staircase with n steps where each move climbs 1 or 2 steps).
  2. Missing naive recursion complexity breakdown: Omits the recurrence explanation, subproblem recalculations, and resulting exponential O(2ⁿ) time and O(n) call-stack space.
  3. Missing memoization vs tabulation comparison: Omits the distinction between top-down memoization's O(n) call-stack space and bottom-up tabulation's iterative array avoiding call-stack growth.
  4. Missing constant-space tabulation optimization: Omits the O(1) auxiliary space optimization that stores only the last two counts (prev1, prev2).
  5. Missing the Coin Change problem: Omits the lesson's worked tabulation algorithm, Infinity array initialization, recurrence formula, unreachable -1 return, and O(amount * number_of_coins) complexity.

Affected Pages

Expected behavior

  • Introduce the climbing stairs problem statement before its solutions.
  • Detail naive recursion exponential O(2ⁿ) complexity and subproblem recalculation.
  • Compare memoization and tabulation time/space costs and call-stack characteristics.
  • Include the constant-space tabulation optimization (O(1) auxiliary space) with JavaScript code.
  • Include the complete Coin Change tabulation algorithm, code, and complexity breakdown.

(A fully tested PR addressing this is ready: #71589)

Activity

  1. added
    status: waiting triage
    js v9 cert
    on Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    js v9 certstatus: waiting triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions