{"id":20827246,"url":"https://github.com/ccnokes/leetcode-sandbox","last_synced_at":"2026-06-19T21:31:38.702Z","repository":{"id":88144206,"uuid":"437973248","full_name":"ccnokes/leetcode-sandbox","owner":"ccnokes","description":null,"archived":false,"fork":false,"pushed_at":"2026-03-23T04:13:27.000Z","size":387,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-24T00:44:12.659Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ccnokes.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":"2021-12-13T17:58:57.000Z","updated_at":"2026-03-23T04:13:31.000Z","dependencies_parsed_at":"2025-03-24T21:27:42.300Z","dependency_job_id":"bd928558-7b0e-4b7b-8ae0-6a882b082cbb","html_url":"https://github.com/ccnokes/leetcode-sandbox","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ccnokes/leetcode-sandbox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccnokes%2Fleetcode-sandbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccnokes%2Fleetcode-sandbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccnokes%2Fleetcode-sandbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccnokes%2Fleetcode-sandbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ccnokes","download_url":"https://codeload.github.com/ccnokes/leetcode-sandbox/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccnokes%2Fleetcode-sandbox/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34549340,"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-19T02:00:06.005Z","response_time":61,"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":[],"created_at":"2024-11-17T23:11:33.478Z","updated_at":"2026-06-19T21:31:38.696Z","avatar_url":"https://github.com/ccnokes.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# My leetcode sandbox\n\nThis is my attempt to get better at algorithms.\n\nMost of these problems are coming from either this [Educative course](https://www.educative.io/courses/grokking-the-coding-interview) or [leetcode](https://leetcode.com/problemset/all).\nThis is a good study guide: https://www.techinterviewhandbook.org/coding-interview-study-plan/\n\n### Bare minimum to know:\n\n_Data structures_\n\n- Linked lists\n- Trees, tries, graphs\n- Stacks and queues\n- Heaps\n- Vectors, array lists\n- Hash tables\n\n_Algorithms_\n\n- Breadth-first search\n- Depth-first search\n- Binary search\n- Merge sort\n- Quick sort\n\n_Concepts_\n\n- Bit manipulation\n- Memory (stack vs heap)\n- Recursion\n- Dynamic programming\n- Big O time and space\n\nAnd from another source:\n_The 10 Most Important Concepts For Coding Interviews (algorithms and data structures)_\n\n1. Logarithm (Complexity Analysis)\n2. Graph Traversals (BFS \u0026 DFS)\n3. Binary Search\n4. Sliding Window\n5. Recursion\n6. 2 Algorithms (Inverting a binary tree \u0026 Reverse a Linked List)\n7. Suffix Trees\n8. Heaps\n9. Dynamic programming\n10. Sorting Algorithms (Quick \u0026 Merge)\n\nBasically everything you do you should always ask: can I use a data structure (especially a hash map) to make this more efficient?\n\n### Glossary of some common math-y terms I can never remember:\n\n- logarithm - A logarithm is a mathematical operation that determines how many times a certain number, called the base, is multiplied by itself to reach another number. The exponent or power to which a base must be raised to yield a given number. The inverse function to exponentiation. 10^3 = 1000 and log10(1000) = 3. A square root specifies the power and asks for the base, e.g `sqrt(25) = 5` because `5^2 = 25`. (\"square\" root means the power is 2). Logarithms specificy the base and asks for the power. `log5(25) = 2`. base^power. Base is implicitly 2 in CS use cases.\n- median - is the middle number in a sorted, ascending or descending, list of numbers. Separates higher half from lower.\n- complement - \"a technique to encode a symmetric range of positive and negative integers in a way that they can use the same algorithm (hardware) for addition throughout the whole range.\" How you get one I think it depends on the representation. For example, in a binary representation you can flip bits to get the complement.\n\n### Bitwise operators\n\n- `^` XOR \"exclusive or\" -- returns a 1 in each bit position for which the corresponding bits of either but not both operands are 1s. Also will be true (1 or greater) if and only if its arguments differ. It returns zero if we take XOR of two same numbers. It returns the same number if we XOR with zero.\n\n## Binary tree height\n\nA complete binary trees' \"height\" (number of levels) can be represented as _log N_.\n\nThere's 7 nodes in this complete binary tree. How many levels are there?\n\n```\n     1\n    /  \\\n   2    3\n  / \\   / \\\n 4   5  6  7\n```\n\n```\n1 + floor(log(7))\n= 3 levels\n```\n\nThe first, root level is added in manually, then we get the floored log2 of the node count. That gets us the height of the tree.\nIn reverse you could say that `2^levels - 1 = approx node count`.\nNote: In macOS spotlight, you can't specify the log base, but if you divide by `log(2)` it works. Eg: `1 + floor(log(7) / log(2)) = 3`\n\nBalanced trees allow you to work in logarithmic time, rather than linear time, which scales better.\n\n---\n\n## Run one test\n\n```\nnpm test -- \u003ctest file path\u003e\n```\n\n## To work on\n\nLinked lists\n\n- reverse a linked list\n- remove nth node from end\n- detect/remove cycle\n- reorder list\n\nK-way merge\nCould add: merge k sorted lists, kth smallest in a matrix, find k pairs with smallest sums.\n\nBacktracking\nNo README and only 2 problems. Missing: N-queens, word search, sudoku solver, letter combinations of phone number. Backtracking has a distinct recursive template worth mastering explicitly.\n\nGraph BFS/DFS\nMissing: clone graph, course schedule detection, word ladder, connected components, Dijkstra's shortest path.\n\nHeaps\n3 problems but heaps appear in many contexts (top K frequent elements, task scheduler, merge k lists). More variety would help.\n\nPractical / Frontend\n\nAsync / Concurrency\n\n- throttle (complement to debounce)\n- Promise.allSettled, Promise.race, Promise.any\n- Async queue with concurrency limit (e.g. max 3 requests in flight)\n- Retry with exponential backoff\n\nBrowser APIs / DOM\n\n- Infinite scroll / intersection observer logic\n- Virtual list (render only visible rows from a large array)\n- Deep clone / deep equal (structuredClone edge cases)\n- Implement a basic CSS selector engine (querySelector)\n\nState / Data\n\n- Implement useState + useEffect from scratch (tiny React)\n- Immutable update helpers (logic behind Immer)\n- Observable / reactive value (tiny RxJS/signal)\n- Pub/sub with namespaced events (extends EventEmitter)\n\nFunctions / Patterns\n\n- curry and partial application\n- pipe / compose\n- Memoize with configurable cache size\n- Deep object diff (what changed between two state snapshots)\n\nSerialization\n\n- Implement JSON.stringify / JSON.parse (handles circular refs, custom replacers)\n- URL query string parser/serializer\n\n## Design patterns to add\n\n- Observer\n- Proxy\n- Decorator\n- Mediator\n- Command\n- Adapter\n- State Machine\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fccnokes%2Fleetcode-sandbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fccnokes%2Fleetcode-sandbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fccnokes%2Fleetcode-sandbox/lists"}