Repository navigation
Open
Labels
js v9 certThis is for the JS V9 certification.status: waiting triageThis issue needs help from moderators and users to reproduce and confirm its validity and fix.
Description
Scope: JavaScript v9 Certification (review-data-structures-js). This is distinct from the Python issue #71532.
Describe the Issue
The JavaScript Data Structures Review (review-data-structures-js) contains several conceptual inaccuracies and omits topics taught in the Working with Common Data Structures JavaScript lecture:
- Big O conflated with worst-case performance: The text defines Big O as "worst-case performance, or growth rate". Big O is an asymptotic upper bound on resource scaling, separate from best-, average-, or worst-case scenarios.
- Quick Sort complexity missing case qualifications: It lists Merge Sort and Quick Sort under
O(n log n)without noting thatO(n log n)is Quick Sort's average case, whereas its worst case isO(n²). - Missing Exponential and Factorial complexities: Omits explanations of
O(2ⁿ)exponential andO(n!)factorial time and space complexities. - Problem-solving methodology is incomplete: Omits algorithm/data structure selection, clean modular implementation, and testing/refinement.
- Static arrays lack memory indexing details and JS clarification: Omits how contiguous storage enables
O(1)random access, and does not clarify that JavaScript arrays are dynamic by default. - Missing auxiliary space complexities: Fails to distinguish auxiliary working memory from container storage for dynamic arrays, stacks, queues, and linked lists.
- Queue dequeue vs array shift: Mentions dequeue as
O(1)without distinguishing abstract queue complexity from JavaScript's array.shift()O(n)re-indexing overhead.
Affected Pages
- File:
curriculum/challenges/english/blocks/review-data-structures-js/699c2dd0e2e1f947791f33fc.md - URL: https://www.freecodecamp.org/learn/javascript-v9/review-data-structures-js/data-structures-review
Expected behavior
- Define Big O as an asymptotic upper bound on resource scaling.
- Clarify Merge Sort's
O(n log n)worst-case vs. Quick Sort'sO(n log n)average-case andO(n²)worst-case. - Add
O(2ⁿ)andO(n!)time and space complexity explanations. - Add algorithm/data structure selection and testing/refinement to problem solving.
- Clarify contiguous memory layout and constant-time indexing for static arrays, noting JavaScript arrays are dynamic.
- Add auxiliary space complexities for dynamic arrays, stacks, queues, and singly linked lists.
- Clarify queue dequeue abstract
O(1)time vs. array.shift()O(n)re-indexing cost.
(A fully tested PR addressing this is ready: #71620)
Metadata
Metadata
Assignees
Labels
js v9 certThis is for the JS V9 certification.status: waiting triageThis issue needs help from moderators and users to reproduce and confirm its validity and fix.
Activity