{"id":28470839,"url":"https://github.com/lordbaldwin1/leetcode","last_synced_at":"2025-07-01T20:32:54.392Z","repository":{"id":259205154,"uuid":"869771024","full_name":"lordbaldwin1/LeetCode","owner":"lordbaldwin1","description":"All of my solved LeetCode problems.","archived":false,"fork":false,"pushed_at":"2025-06-19T04:17:42.000Z","size":137,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-19T05:28:08.913Z","etag":null,"topics":["cpp","javascript","python"],"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/lordbaldwin1.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}},"created_at":"2024-10-08T21:24:52.000Z","updated_at":"2025-06-19T04:17:46.000Z","dependencies_parsed_at":"2025-02-15T00:23:17.675Z","dependency_job_id":"16a3e647-aae6-4bdf-8610-c436924d9298","html_url":"https://github.com/lordbaldwin1/LeetCode","commit_stats":null,"previous_names":["lordbaldwin1/leetcode"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lordbaldwin1/LeetCode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lordbaldwin1%2FLeetCode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lordbaldwin1%2FLeetCode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lordbaldwin1%2FLeetCode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lordbaldwin1%2FLeetCode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lordbaldwin1","download_url":"https://codeload.github.com/lordbaldwin1/LeetCode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lordbaldwin1%2FLeetCode/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263033208,"owners_count":23403116,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cpp","javascript","python"],"created_at":"2025-06-07T10:06:40.316Z","updated_at":"2025-07-01T20:32:54.353Z","avatar_url":"https://github.com/lordbaldwin1.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Study Notes for NeetCode 150 Problems\n\n## Contains Duplicate\n- hash map\n- iterate nums, flag map[num] or just make count, check if map[num] is defined\n- return true if map[num] !== undefined\n\n## Valid Anagram\n- sort both, easy method\n- hash map (optimal): check length, make count hash map of both\n- iterate over one hash map's keys and check if map[key] === map2[key]\n- for (const key in map)!!!!\n\n## Two Sum\n- hash map\n- iterate through array\n- calc diff between target and current number\n- check if it exists and is not the current index\n- return diff's index and current index\n\n## Group Anagrams\n- **First Method** Sorting\n- hash map\n- iterate through array of strings\n- sort, push original string to map at sorted index\n- return Object.values(map)\n- **Optimal Method** Char Count\n- hash map\n- iterate through array of strings\n- make array new array len 26 fill 0\n- iterate through chars, fill char count \"c.charCodeAt(0)\"\n- so same thing, joined char count array is key\n- push og string to map\n- return Object.values(map)\n\n  ## Top K Frequent Elements\n  - **Easy Method** Sorting w/ hash map\n  - Make hash map with count\n  - Turn map into array where each element is array with num and count\n  - Sort array by count\n  - return array of top k elements\n \n  ## Longest Consecutive Sequence\n  - Set\n  - iterate set\n  - if no num - 1, thats a set\n  - continue while(num[n + streak))\n  - keep track of longest\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flordbaldwin1%2Fleetcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flordbaldwin1%2Fleetcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flordbaldwin1%2Fleetcode/lists"}