{"id":49846782,"url":"https://github.com/singharyan006/algo-practice","last_synced_at":"2026-05-14T12:44:00.612Z","repository":{"id":304203203,"uuid":"1018097413","full_name":"singharyan006/algo-practice","owner":"singharyan006","description":"Simple JavaScript implementations of two classic algorithms — Fibonacci and Merge Sort. This project helped me understand how recursion works and how to break problems into smaller steps.","archived":false,"fork":false,"pushed_at":"2025-07-11T16:01:43.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-11T17:56:37.482Z","etag":null,"topics":["binary-sort","divide-and-conquer","fibonacci","iteration","javascript","merge-sort","recursion"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/singharyan006.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2025-07-11T15:47:25.000Z","updated_at":"2025-07-11T16:01:46.000Z","dependencies_parsed_at":"2025-07-13T02:01:56.420Z","dependency_job_id":null,"html_url":"https://github.com/singharyan006/algo-practice","commit_stats":null,"previous_names":["singharyan006/algo-practice"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/singharyan006/algo-practice","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singharyan006%2Falgo-practice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singharyan006%2Falgo-practice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singharyan006%2Falgo-practice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singharyan006%2Falgo-practice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/singharyan006","download_url":"https://codeload.github.com/singharyan006/algo-practice/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singharyan006%2Falgo-practice/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33026037,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"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":["binary-sort","divide-and-conquer","fibonacci","iteration","javascript","merge-sort","recursion"],"created_at":"2026-05-14T12:43:59.801Z","updated_at":"2026-05-14T12:44:00.564Z","avatar_url":"https://github.com/singharyan006.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🧠 Algorithm Practice: Recursion, Sorting, Linked List, HashMap \u0026 BST\n\nThis project contains fundamental algorithm and data structure implementations, done as part of [The Odin Project](https://www.theodinproject.com/) curriculum.\n\nIt focuses on **recursive thinking**, **sorting**, **linked lists**, **hash maps**, and now includes a fully-featured **binary search tree** with balance and traversal operations.\n\n---\n\n## 📂 Files\n\n```\nalgo-practice/\n├── recursion/\n│ ├── iterative.js\n│ └── recursive.js\n├── merge-sort/\n│ └── mergeSort.js\n├── linked-list/\n│ ├── Node.js\n│ ├── LinkedList.js\n│ ├── test.js\n│ └── README.md\n├── hashmap/\n│ ├── hashMap.js\n│ ├── test.js\n│ └── README.md\n├── binary-search-tree/\n│ ├── Node.js\n│ ├── Tree.js\n│ ├── driver.js\n│ ├── prettyPrint.js\n│ └── README.md\n└── README.md\n```\n\n### `🌀 recursion/`\n- `fibs(limit)` → Iterative Fibonacci generator\n- `fibsRec(limit)` → Recursive Fibonacci generator\n\n### `🧮 merge-sort/`\n- `mergeSort(arr)` → Recursive merge sort implementation\n- Includes a custom `merge()` function to combine sorted halves\n\n### `🧩 linked-list/`\n- Node.js → Defines the Node structure\n- LinkedList.js → Contains core linked list methods like:\n  - `append()`, `prepend()`, `size()`, `at()`, `pop()`, `find()`, `contains()`, `toString()`\n- test.js → Sample test cases to validate the implementation\n\n### 🔐 `hashmap/`\n- Custom `HashMap` class with:\n  - Chained collision handling\n  - Resizing logic when load factor exceeds 0.75\n  - Methods like `set`, `get`, `has`, `remove`, `clear`, `keys`, `values`, `entries`\n- Notes + test cases included  \n➡️ [View detailed HashMap README →](./hashmap/README.md)\n\n### 🌳 `binary-search-tree/`\n- `Node.js` and `Tree.js` → Fully-featured **Balanced BST** implementation\n- `buildTree()` builds a balanced tree from sorted unique array\n- Supports:\n  - `insert()`, `deleteItem()`, `find()`\n  - `height()`, `depth()`, `isBalanced()`, `rebalance()`\n  - Traversals: `inOrder`, `preOrder`, `postOrder`, `levelOrder` with callbacks\n- Includes a `prettyPrint()` visualizer and `driver.js` demo\n➡️ [View detailed BST README →](./binary-search-tree/README.md)\n\n---\n\n## 🚀 Sample Inputs \u0026 Outputs\n\n### Recursion:\n```js\nfibs(8); \n// ➜ [0, 1, 1, 2, 3, 5, 8, 13]\n\nfibsRec(10); \n// ➜ [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]\n```\n\n### Merge Sort:\n```js\nmergeSort([3, 2, 1, 13, 8, 5, 0, 1]);\n// ➜ [0, 1, 1, 2, 3, 5, 8, 13]\n\nmergeSort([105, 79, 100, 110]);\n// ➜ [79, 100, 105, 110]\n```\n\n---\n\n## 🧩 What I Learned\n\n- The difference between iterative vs recursive solutions.\n- How to build data structures from scratch — LinkedList, HashMap, BST.\n- Handling collisions and resizing logic in hash-based storage.\n- Balancing and traversing binary search trees efficiently.\n- The importance of clear, testable, modular code.\n- How lower-level data structures power high-level abstractions.\n\n---\n\n## 📄 License\nThis project is for educational purposes under the [MIT License](LICENSE).\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsingharyan006%2Falgo-practice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsingharyan006%2Falgo-practice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsingharyan006%2Falgo-practice/lists"}