{"id":41965941,"url":"https://github.com/dfernandeza/data-structures-and-algorithms","last_synced_at":"2026-01-25T23:09:18.400Z","repository":{"id":74077055,"uuid":"469384367","full_name":"dfernandeza/data-structures-and-algorithms","owner":"dfernandeza","description":"Implementations for common data structures and algorithms using modern JavaScript.","archived":false,"fork":false,"pushed_at":"2024-01-07T20:02:28.000Z","size":273,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-01-07T21:25:32.557Z","etag":null,"topics":["algorithms","data-structures","javascript","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dfernandeza.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-03-13T13:46:53.000Z","updated_at":"2023-06-05T10:43:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"609edf74-bc00-4702-8554-f42322599774","html_url":"https://github.com/dfernandeza/data-structures-and-algorithms","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/dfernandeza/data-structures-and-algorithms","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfernandeza%2Fdata-structures-and-algorithms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfernandeza%2Fdata-structures-and-algorithms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfernandeza%2Fdata-structures-and-algorithms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfernandeza%2Fdata-structures-and-algorithms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dfernandeza","download_url":"https://codeload.github.com/dfernandeza/data-structures-and-algorithms/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfernandeza%2Fdata-structures-and-algorithms/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28761747,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T23:06:19.311Z","status":"ssl_error","status_checked_at":"2026-01-25T23:03:50.555Z","response_time":113,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","javascript","typescript"],"created_at":"2026-01-25T23:09:17.684Z","updated_at":"2026-01-25T23:09:18.390Z","avatar_url":"https://github.com/dfernandeza.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Data structures and algorithms (DSA)\n\n![CI passing](https://github.com/dfernandeza/data-structures-and-algorithms/actions/workflows/ci.yml/badge.svg)\n![solved coding problems](https://img.shields.io/badge/solved%20coding%20problems-20-success)\n\nThis repository contains implementations of common data structures and algorithms using modern JavaScript.\n\nThe intention with this repository is not to only serve as a playground to learn DSA (or as a refresher) but also to practice solving different coding problems using DSA.\n\n## Covered data structures\n\n- [x] Array\n- [x] Linked list\n- [x] Doubly-linked list\n- [x] Stack\n- [x] Queue\n- [x] Tree\n- [ ] Trie\n- [x] Binary search tree\n- [x] AVL tree\n- [ ] Red-Black tree\n- [x] Binary heap\n- [x] Graph\n\n## Covered algorithms\n\n### Sorting\n\n- [x] Bubble sort\n- [x] Insertion sort\n- [x] Selection sort\n- [x] Merge sort\n- [x] Quick sort\n- [x] Bucket sort\n- [x] Counting sort\n- [x] Radix sort\n- [x] Cycle sort\n- [x] Heap sort\n- [x] Topological sort (top-sort)\n\n### Searching\n\n- [x] Linear search\n- [x] Binary search\n- [ ] Interpolation search\n- [x] Breadth first search\n- [x] Depth first search\n\n### Others\n\nShortest path\n\n- [x] Dijkstra's\n- [ ] Floyd-Warshall\n- [ ] Minimum spanning tree (MST)\n- [ ] Prim's\n- [ ] Kruskal's\n- [ ] Bellman–Ford\n\n## Covered algorithms designs and techniques\n\n- [x] Divide and conquer\n- [x] Dynamic programming\n- [x] Greedy\n- [x] Backtracking\n\n## Exploring the code\n\nThere are 2 directories `algorithms` and `data-structures` where you can find all the different implementations. Each algorithm and data structure would have a `README` file containing a small description and a list of coding problems that maps to a `*.problems.test.js` file containing the solutions.\n\n## Running your own copy\n\nTo run your own copy, fork this repository and execute:\n\n```\nnpm i\nnpm test\n```\n\n## Running specific tests\n\nYou can target specific tests by using the `--testNamePattern` (or `-t`) flag. For example, \n\nTo run all the tests related to the `array` data structure, you can execute:\n\n```\nnpm test -- -t \"Array\"\n```\n\nTo run tests the array problem 1, you can execute:\n\n```\nnpm test -- -t \"Array Problem 1\"\n```\n\n_This project uses [Jest](https://github.com/facebook/jest) for writing the tests and [SWC](https://github.com/swc-project/swc) as the test runner._\n\n## Resources\n\nThese are the resources I've been using to sharp my DSA skills in case you are also interested:\n\n- [Learning JavaScript data structures and algorithms [Book]](https://github.com/PacktPublishing/Learning-JavaScript-Data-Structures-and-Algorithms-Third-Edition)\n- [Grokking Algorithms [Book]](https://www.manning.com/books/grokking-algorithms)\n- [itsy-bitsy-data-structures](https://github.com/jamiebuilds/itsy-bitsy-data-structures/)\n- [GeeksforGeeks](https://www.geeksforgeeks.org/data-structures/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfernandeza%2Fdata-structures-and-algorithms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdfernandeza%2Fdata-structures-and-algorithms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfernandeza%2Fdata-structures-and-algorithms/lists"}