{"id":28138635,"url":"https://github.com/ahmedalyelghannam/leetcode_playground","last_synced_at":"2025-05-14T17:15:51.085Z","repository":{"id":287311374,"uuid":"964317370","full_name":"AhmedAlyElGhannam/LeetCode_Playground","owner":"AhmedAlyElGhannam","description":"Just a repo to collect my solutions for Leetcode problems.","archived":false,"fork":false,"pushed_at":"2025-05-10T09:40:40.000Z","size":49,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-10T10:32:43.403Z","etag":null,"topics":["cpp","leetcode-solutions","problem-solving"],"latest_commit_sha":null,"homepage":"","language":"C++","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/AhmedAlyElGhannam.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":"2025-04-11T02:58:10.000Z","updated_at":"2025-05-10T09:40:43.000Z","dependencies_parsed_at":"2025-04-26T03:28:03.130Z","dependency_job_id":"0a4f5e1f-388a-48ae-b71a-eb39ac666126","html_url":"https://github.com/AhmedAlyElGhannam/LeetCode_Playground","commit_stats":null,"previous_names":["ahmedalyelghannam/leetcode_playground"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AhmedAlyElGhannam%2FLeetCode_Playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AhmedAlyElGhannam%2FLeetCode_Playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AhmedAlyElGhannam%2FLeetCode_Playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AhmedAlyElGhannam%2FLeetCode_Playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AhmedAlyElGhannam","download_url":"https://codeload.github.com/AhmedAlyElGhannam/LeetCode_Playground/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254190423,"owners_count":22029638,"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","leetcode-solutions","problem-solving"],"created_at":"2025-05-14T17:14:38.651Z","updated_at":"2025-05-14T17:15:51.076Z","avatar_url":"https://github.com/AhmedAlyElGhannam.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LeetCode_Playground\n\n## Progress\n### Day 1 (9/4/2025)\n- [x] 4. Median of Two Sorted Arrays **Hard**\n- [x] 35. Search Insert Position **Easy**\n- [x] 374. Guess Number Higher or Lower **Easy**\n- [x] 704. Binary Search **Easy**\n### Day 2 (10/4/2025)\n- [x] 744. Find Smallest Letter Greater Than Target **Easy**\n### Day 3 (11/4/2025)\n- [x] 50. pow(x, n) **Medium**\n### Day 4 (12/4/2025)\n- [x] 2. Add Two Numbers **Medium**\n- [x] 231. Power of Two **Easy**\n- [x] 191. Number of 1 Bits **Easy**\n### Day 5 (13/4/2025)\n- [x] 148. Sort List **Easy**\n- [x] 190. Reverse Bits **Easy**\n- [x] 326. Power of Three **Easy**\n- [x] 342. Power of Four **Easy**\n### Day 6 (14/4/2025)\n- [x] 143. Reorder List **Medium**\n- [x] 206. Reverse Linked List **Easy**\n- [x] 2807. In Greatest Common Divisor in Linked List **Medium**\n- [x] 876. Middle of The Linked List **Easy**\n### Day 7 (15/4/2025)\n- [x] 21. Merge Two Sorted Lists **Easy**\n- [x] 217. Contains Duplicate **Easy**\n### Day 8 (16/4/2025)\n- [x] 141. Linked List Cycle **Easy**\n### Day 9 (17/4/2025)\n- [x] 160. Intersection of Two Linked Lists **Easy**\n### Day 10 (18/4/2025)\n- [x] 169. Majority Element **Easy**\n### Day 11 (19/4/2025)\n- [x] 169. Majority Element **Easy** (Solved it again with a different approach)\n- [x] 229. Majority Element II **Medium**\n\n## Solution Rationale\n- #4 Median of Two Sorted Arrays \u0026rarr; Inserted two vectors into a larger vector and used `stl` sorting algorithm on it.\n- #35 Search Insert Position \u0026rarr; Binary search to find if the element is already there **or if it is not, return `lowerBound` since it holds the index at which element should be inserted in**.\n- #374 Guess Number Higher or Lower \u0026rarr; Binary search with extra steps.\n- #704 Binary Search \u0026rarr; Binary search.\n- #744 Find Smallest Letter Greater Than Target \u0026rarr; Binary search but with letters.\n- #50 pow(x, n) \u0026rarr; Exponentiation by squaring with recursion + wrapper function to handle negative powers.\n- #2 Add Two Numbers \u0026rarr; Recursion to handle base cases and carry + utilized Linked Lists properties.\n- #231 Power of Two \u0026arr; Solved it twice: using recursion \u0026 bit masking then using a single bit manipulation statement. Both run blazingly fast but the single statement uses slightly lower memory.\n- #191 Number of 1 Bits \u0026rarr; Recursion and bit masking. Similar to my recursive approach in #231 but even easier.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmedalyelghannam%2Fleetcode_playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahmedalyelghannam%2Fleetcode_playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmedalyelghannam%2Fleetcode_playground/lists"}