{"id":50651166,"url":"https://github.com/shahadathhs/data-structures-and-algorithms-in-javascript","last_synced_at":"2026-06-07T18:30:47.662Z","repository":{"id":345222796,"uuid":"1019555686","full_name":"shahadathhs/data-structures-and-algorithms-in-javascript","owner":"shahadathhs","description":"A comprehensive collection of algorithms and data structures in JavaScript, based on the book Mastering Algorithms and Data Structures in JavaScript by Federico Kereki.","archived":false,"fork":false,"pushed_at":"2026-03-18T06:01:07.000Z","size":9998,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-18T21:42:45.047Z","etag":null,"topics":["algorithms","data-structures","dsa","javascript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shahadathhs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-14T14:04:33.000Z","updated_at":"2026-03-18T06:02:47.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/shahadathhs/data-structures-and-algorithms-in-javascript","commit_stats":null,"previous_names":["shahadathhs/data-structures-and-algorithms-in-javascript"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/shahadathhs/data-structures-and-algorithms-in-javascript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahadathhs%2Fdata-structures-and-algorithms-in-javascript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahadathhs%2Fdata-structures-and-algorithms-in-javascript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahadathhs%2Fdata-structures-and-algorithms-in-javascript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahadathhs%2Fdata-structures-and-algorithms-in-javascript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shahadathhs","download_url":"https://codeload.github.com/shahadathhs/data-structures-and-algorithms-in-javascript/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shahadathhs%2Fdata-structures-and-algorithms-in-javascript/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34034024,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-07T02:00:07.652Z","response_time":124,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithms","data-structures","dsa","javascript"],"created_at":"2026-06-07T18:30:47.102Z","updated_at":"2026-06-07T18:30:47.650Z","avatar_url":"https://github.com/shahadathhs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Data Structures and Algorithms in JavaScript\n\nA comprehensive collection of algorithms and data structures in JavaScript, based on the book [**\"Mastering Algorithms and Data Structures in JavaScript\"**](./data_structures_and_algorithms_in_javascript.pdf) by Federico Kereki.\n\n## 📚 Overview\n\nThis repository contains the original working implementations from the book, organized and maintained for easy reference and learning. Each chapter focuses on specific concepts with working code examples and tests, exactly as provided by the author. Read the full book here: [**Mastering Algorithms and Data Structures in JavaScript (PDF)**](./data_structures_and_algorithms_in_javascript.pdf).\n\n## 📚 Content Overview\n\n### Core Topics\n\n- **01 - Using JavaScript** - JavaScript fundamentals for algorithms\n- **02 - Functional Programming** - Higher-order functions, memoization, and closures\n- **03 - Abstract Data Types** - Stacks, queues, and other ADTs\n- **05 - Designing Algorithms** - Recursion, backtracking, and dynamic programming\n- **06 - Sorting** - Quicksort, mergesort, and in-place algorithms\n- **07 - Selecting** - Selection algorithms and order statistics\n- **08 - Shuffling and Sampling** - Randomization techniques\n- **09 - Searching** - Binary search and search strategies\n\n### Data Structures\n\n- **10 - Lists** - Linked lists, arrays, and sequences\n- **11 - Bags and Sets** - Set operations and implementations\n- **12 - Binary Trees** - BST, AVL, splay trees, and randomized BSTs\n- **13 - Trees and Forests** - General trees and tree traversals\n- **14 - Heaps and Treaps** - Priority queues and randomized search trees\n- **15 - Extended Heaps** - Binomial heaps and advanced structures\n- **16 - Digital Trees** - Tries, radix trees, and ternary search trees\n- **17 - Graphs** - Graph algorithms, topological sort, and cycle detection\n- **18 - Functional Data Structures** - Persistent data structures\n\n## 🛠️ Getting Started\n\n### Prerequisites\n\n- Node.js (v18 or higher recommended)\n- pnpm (package manager)\n\n### Installation\n\n```bash\n# Install dependencies\npnpm install\n```\n\n### Usage\n\n```bash\n# Run a specific algorithm file\nnode \"06 sorting/quicksort.js\"\n\n# Run tests\nnode \"12 binary_trees/avl_tree.test.js\"\n```\n\n## 🔧 Development\n\n### Linting and Formatting\n\nThis project uses ESLint and Prettier for code quality and consistency.\n\n```bash\n# Check code style\npnpm run lint\n\n# Fix linting issues\npnpm run lint:fix\n\n# Check formatting\npnpm run format\n\n# Fix formatting\npnpm run format:fix\n\n# Run all checks\npnpm run check\n```\n\n## 📖 Code Examples\n\nEach directory contains working implementations:\n\n```javascript\n// Example: Binary Search Tree\nconst {\n  insert,\n  find,\n  remove\n} = require(\"./12 binary_trees/binary_search_tree\");\n\nlet tree = null;\ntree = insert(tree, 5);\ntree = insert(tree, 3);\ntree = insert(tree, 7);\n\nconsole.log(find(tree, 3)); // true\n```\n\n## 🏗️ Project Structure\n\n```\n.\n├── 01 using_js/                    # JavaScript fundamentals\n├── 02 functional_programming/      # FP concepts\n├── 03 abstract_data_types/         # Basic ADTs\n├── 05 designing_algorithms/        # Algorithm design patterns\n├── 06 sorting/                     # Sorting algorithms\n├── 07 selecting/                   # Selection algorithms\n├── 08 shuffling_and_sampling/      # Randomization\n├── 09 searching/                   # Search algorithms\n├── 10 lists/                       # List implementations\n├── 11 bags_and_sets/               # Set data structures\n├── 12 binary_trees/                # Binary search trees\n├── 13 trees_and_forests/           # Tree structures\n├── 14 heaps_and_treaps/            # Heaps and treaps\n├── 15 extended_heaps/              # Advanced heaps\n├── 16 digital_trees/               # Tries and digital trees\n├── 17 graphs/                      # Graph algorithms\n├── 18 functional_data_structures/  # Persistent structures\n└── data/                           # Test data files\n```\n\n---\n\n_All implementations are from the book \"Mastering Algorithms and Data Structures in JavaScript\" by Federico Kereki._\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshahadathhs%2Fdata-structures-and-algorithms-in-javascript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshahadathhs%2Fdata-structures-and-algorithms-in-javascript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshahadathhs%2Fdata-structures-and-algorithms-in-javascript/lists"}