{"id":22296714,"url":"https://github.com/akankshakumari393/leetcode","last_synced_at":"2025-07-29T01:32:33.544Z","repository":{"id":41516582,"uuid":"471329013","full_name":"akankshakumari393/leetcode","owner":"akankshakumari393","description":"Leetcode solutions(Golang) Actively updating","archived":false,"fork":false,"pushed_at":"2022-09-14T17:22:40.000Z","size":434,"stargazers_count":90,"open_issues_count":1,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-05T05:51:12.657Z","etag":null,"topics":["algorithms","data-structures","go","golang","interview-practice","leetcode","leetcode-solutions"],"latest_commit_sha":null,"homepage":"","language":"Go","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/akankshakumari393.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}},"created_at":"2022-03-18T10:43:25.000Z","updated_at":"2024-08-23T18:48:15.000Z","dependencies_parsed_at":"2023-01-18T07:45:46.604Z","dependency_job_id":null,"html_url":"https://github.com/akankshakumari393/leetcode","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/akankshakumari393/leetcode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akankshakumari393%2Fleetcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akankshakumari393%2Fleetcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akankshakumari393%2Fleetcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akankshakumari393%2Fleetcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akankshakumari393","download_url":"https://codeload.github.com/akankshakumari393/leetcode/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akankshakumari393%2Fleetcode/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267616581,"owners_count":24116154,"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","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"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":["algorithms","data-structures","go","golang","interview-practice","leetcode","leetcode-solutions"],"created_at":"2024-12-03T17:47:20.785Z","updated_at":"2025-07-29T01:32:32.862Z","avatar_url":"https://github.com/akankshakumari393.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## REAL LIFE USAGE FOR DATASTRUCTURE\n\n**Array**:\nSeat of a Theatre represents an 2D array\n\n**StacK**:\n\nThe browser history is stored in stack usually so we can go back to the last visited pages.\n\n**Singly Linked List**:\n\nIn a music player, songs are connected, we play one song then we get the other song in the playlist automatically, that's because the songs are connected and we can consider them as nodes.\n\n**Doubly Linked List**:\n\nSometime we would like to go back to the previous song played so that's where doubly Linked list comes in picture. From each of the song we can either go back or play the next song. .\n\n**Circular Linked List**:\n\nSometime we would like the playlist to play the first song again once it finishes playing all or in simple terms repeat itself. That's where Circular linked list comes in picture.\n\n**Graph**:\n\nGoogle Map uses graph, each cities(nodes) are connected with some edges(path) that have some weight(distance). Google map uses graph algorithm to find the shortest path between two cities.\n\n**BST(Binary Search Tree)**:\n\nIt would take at worst n element to insert/delete an element from a sorted array. So we represent it using BST. So searching and Retrieval is mostly done using BST. \n\n# leetcode\nLeetcode solutions(Golang)\n\n[1-two-sum](https://github.com/akankshakumari393/leetcode/tree/master/1-two-sum) \\\n[2-add-two-numbers](https://github.com/akankshakumari393/leetcode/tree/master/2-add-two-numbers) \\\n[3-longest-substring-without-repeating-characters](https://github.com/akankshakumari393/leetcode/tree/master/3-longest-substring-without-repeating-characters) \\\n[4-median-of-two-sorted-arrays](https://github.com/akankshakumari393/leetcode/tree/master/4-median-of-two-sorted-arrays) \\\n[5-longest-palindromic-substring](https://github.com/akankshakumari393/leetcode/tree/master/5-longest-palindromic-substring) \\\n[8-string-to-integer-atoi](https://github.com/akankshakumari393/leetcode/tree/master/8-string-to-integer-atoi) \\\n[9-palindrome-number](https://github.com/akankshakumari393/leetcode/tree/master/9-palindrome-number) \\\n[11-container-with-most-water](https://github.com/akankshakumari393/leetcode/tree/master/11-container-with-most-water) \\\n[12-integer-to-roman](https://github.com/akankshakumari393/leetcode/tree/master/12-integer-to-roman) \\\n[13-roman-to-integer](https://github.com/akankshakumari393/leetcode/tree/master/13-roman-to-integer) \\\n[14-longest-common-prefix](https://github.com/akankshakumari393/leetcode/tree/master/14-longest-common-prefix) \\\n[15-3sum](https://github.com/akankshakumari393/leetcode/tree/master/15-3sum) \\\n[19-remove-nth-node-from-end-of-list](https://github.com/akankshakumari393/leetcode/tree/master/19-remove-nth-node-from-end-of-list) \\\n[20-valid-parentheses](https://github.com/akankshakumari393/leetcode/tree/master/20-valid-parentheses) \\\n[21-merge-two-sorted-lists](https://github.com/akankshakumari393/leetcode/tree/master/21-merge-two-sorted-lists) \\\n[26-remove-duplicates-from-sorted-array](https://github.com/akankshakumari393/leetcode/tree/master/26-remove-duplicates-from-sorted-array) \\\n[27-remove-element](https://github.com/akankshakumari393/leetcode/tree/master/27-remove-element) \\\n[31-next-permutation](https://github.com/akankshakumari393/leetcode/tree/master/31-next-permutation) \\\n[33-search-in-rotated-sorted-array](https://github.com/akankshakumari393/leetcode/tree/master/33-search-in-rotated-sorted-array) \\\n[34-find-first-and-last-position-of-element-in-sorted-array](https://github.com/akankshakumari393/leetcode/tree/master/34-find-first-and-last-position-of-element-in-sorted-array) \\\n[35-search-insert-position](https://github.com/akankshakumari393/leetcode/tree/master/35-search-insert-position) \\\n[36-valid-sudoku](https://github.com/akankshakumari393/leetcode/tree/master/36-valid-sudoku) \\\n[39-combination-sum](https://github.com/akankshakumari393/leetcode/tree/master/39-combination-sum) \\\n[46-permutations](https://github.com/akankshakumari393/leetcode/tree/master/46-permutations) \\\n[48-rotate-image](https://github.com/akankshakumari393/leetcode/tree/master/48-rotate-image) \\\n[49-group-anagrams](https://github.com/akankshakumari393/leetcode/tree/master/49-group-anagrams) \\\n[50-powx-n](https://github.com/akankshakumari393/leetcode/tree/master/50-powx-n) \\\n[53-maximum-subarray](https://github.com/akankshakumari393/leetcode/tree/master/53-maximum-subarray) \\\n[56-merge-intervals](https://github.com/akankshakumari393/leetcode/tree/master/56-merge-intervals) \\\n[58-length-of-last-word](https://github.com/akankshakumari393/leetcode/tree/master/58-length-of-last-word) \\\n[61-rotate-list](https://github.com/akankshakumari393/leetcode/tree/master/61-rotate-list) \\\n[62-unique-paths](https://github.com/akankshakumari393/leetcode/tree/master/62-unique-paths) \\\n[64-minimum-path-sum](https://github.com/akankshakumari393/leetcode/tree/master/64-minimum-path-sum) \\\n[66-plus-one](https://github.com/akankshakumari393/leetcode/tree/master/66-plus-one) \\\n[69-sqrtx](https://github.com/akankshakumari393/leetcode/tree/master/69-sqrtx) \\\n[70-climbing-stairs](https://github.com/akankshakumari393/leetcode/tree/master/70-climbing-stairs) \\\n[73-set-matrix-zeroes](https://github.com/akankshakumari393/leetcode/tree/master/73-set-matrix-zeroes) \\\n[74-search-a-2d-matrix](https://github.com/akankshakumari393/leetcode/tree/master/74-search-a-2d-matrix) \\\n[75-sort-colors](https://github.com/akankshakumari393/leetcode/tree/master/75-sort-colors) \\\n[77-combinations](https://github.com/akankshakumari393/leetcode/tree/master/77-combinations) \\\n[81-search-in-rotated-sorted-array-ii](https://github.com/akankshakumari393/leetcode/tree/master/81-search-in-rotated-sorted-array-ii) \\\n[83-remove-duplicates-from-sorted-list](https://github.com/akankshakumari393/leetcode/tree/master/83-remove-duplicates-from-sorted-list) \\\n[88-merge-sorted-array](https://github.com/akankshakumari393/leetcode/tree/master/88-merge-sorted-array) \\\n[92-reverse-linked-list-ii](https://github.com/akankshakumari393/leetcode/tree/master/92-reverse-linked-list-ii) \\\n[94-binary-tree-inorder-traversal](https://github.com/akankshakumari393/leetcode/tree/master/94-binary-tree-inorder-traversal) \\\n[98-validate-binary-search-tree](https://github.com/akankshakumari393/leetcode/tree/master/98-validate-binary-search-tree) \\\n[100-same-tree](https://github.com/akankshakumari393/leetcode/tree/master/100-same-tree) \\\n[101-symmetric-tree](https://github.com/akankshakumari393/leetcode/tree/master/101-symmetric-tree) \\\n[102-binary-tree-level-order-traversal](https://github.com/akankshakumari393/leetcode/tree/master/102-binary-tree-level-order-traversal) \\\n[104-maximum-depth-of-binary-tree](https://github.com/akankshakumari393/leetcode/tree/master/104-maximum-depth-of-binary-tree) \\\n[105-construct-binary-tree-from-preorder-and-inorder-traversal](https://github.com/akankshakumari393/leetcode/tree/master/105-construct-binary-tree-from-preorder-and-inorder-traversal) \\\n[106-construct-binary-tree-from-inorder-and-postorder-traversal](https://github.com/akankshakumari393/leetcode/tree/master/106-construct-binary-tree-from-inorder-and-postorder-traversal) \\\n[108-convert-sorted-array-to-binary-search-tree](https://github.com/akankshakumari393/leetcode/tree/master/108-convert-sorted-array-to-binary-search-tree) \\\n[111-minimum-depth-of-binary-tree](https://github.com/akankshakumari393/leetcode/tree/master/111-minimum-depth-of-binary-tree) \\\n[118-pascals-triangle](https://github.com/akankshakumari393/leetcode/tree/master/118-pascals-triangle) \\\n[119-pascals-triangle-ii](https://github.com/akankshakumari393/leetcode/tree/master/119-pascals-triangle-ii) \\\n[121-best-time-to-buy-and-sell-stock](https://github.com/akankshakumari393/leetcode/tree/master/121-best-time-to-buy-and-sell-stock) \\\n[125-valid-palindrome](https://github.com/akankshakumari393/leetcode/tree/master/125-valid-palindrome) \\\n[128-longest-consecutive-sequence](https://github.com/akankshakumari393/leetcode/tree/master/128-longest-consecutive-sequence) \\\n[130-surrounded-regions](https://github.com/akankshakumari393/leetcode/tree/master/130-surrounded-regions) \\\n[133-clone-graph](https://github.com/akankshakumari393/leetcode/tree/master/133-clone-graph) \\\n[136-single-number](https://github.com/akankshakumari393/leetcode/tree/master/136-single-number) \\\n[138-copy-list-with-random-pointer](https://github.com/akankshakumari393/leetcode/tree/master/138-copy-list-with-random-pointer) \\\n[141-linked-list-cycle](https://github.com/akankshakumari393/leetcode/tree/master/141-linked-list-cycle) \\\n[142-linked-list-cycle-ii](https://github.com/akankshakumari393/leetcode/tree/master/142-linked-list-cycle-ii) \\\n[144-binary-tree-preorder-traversal](https://github.com/akankshakumari393/leetcode/tree/master/144-binary-tree-preorder-traversal) \\\n[145-binary-tree-postorder-traversal](https://github.com/akankshakumari393/leetcode/tree/master/145-binary-tree-postorder-traversal) \\\n[153-find-minimum-in-rotated-sorted-array](https://github.com/akankshakumari393/leetcode/tree/master/153-find-minimum-in-rotated-sorted-array) \\\n[160-intersection-of-two-linked-lists](https://github.com/akankshakumari393/leetcode/tree/master/160-intersection-of-two-linked-lists) \\\n[162-find-peak-element](https://github.com/akankshakumari393/leetcode/tree/master/162-find-peak-element) \\\n[169-majority-element](https://github.com/akankshakumari393/leetcode/tree/master/169-majority-element) \\\n[199-binary-tree-right-side-view](https://github.com/akankshakumari393/leetcode/tree/master/199-binary-tree-right-side-view) \\\n[200-number-of-islands](https://github.com/akankshakumari393/leetcode/tree/master/200-number-of-islands) \\\n[203-remove-linked-list-elements](https://github.com/akankshakumari393/leetcode/tree/master/203-remove-linked-list-elements) \\\n[206-reverse-linked-list](https://github.com/akankshakumari393/leetcode/tree/master/206-reverse-linked-list) \\\n[207-course-schedule](https://github.com/akankshakumari393/leetcode/tree/master/207-course-schedule) \\\n[210-course-schedule-ii](https://github.com/akankshakumari393/leetcode/tree/master/210-course-schedule-ii) \\\n[217-contains-duplicate](https://github.com/akankshakumari393/leetcode/tree/master/217-contains-duplicate) \\\n[219-contains-duplicate-ii](https://github.com/akankshakumari393/leetcode/tree/master/219-contains-duplicate-ii) \\\n[226-invert-binary-tree](https://github.com/akankshakumari393/leetcode/tree/master/226-invert-binary-tree) \\\n[229-majority-element-ii](https://github.com/akankshakumari393/leetcode/tree/master/229-majority-element-ii) \\\n[234-palindrome-linked-list](https://github.com/akankshakumari393/leetcode/tree/master/234-palindrome-linked-list) \\\n[235-lowest-common-ancestor-of-a-binary-search-tree](https://github.com/akankshakumari393/leetcode/tree/master/235-lowest-common-ancestor-of-a-binary-search-tree) \\\n[240-search-a-2d-matrix-ii](https://github.com/akankshakumari393/leetcode/tree/master/240-search-a-2d-matrix-ii) \\\n[242-valid-anagram](https://github.com/akankshakumari393/leetcode/tree/master/242-valid-anagram)\n[278-first-bad-version](https://github.com/akankshakumari393/leetcode/tree/master/278-first-bad-version) \\\n[287-find-the-duplicate-number](https://github.com/akankshakumari393/leetcode/tree/master/287-find-the-duplicate-number) \\\n[289-game-of-life](https://github.com/akankshakumari393/leetcode/tree/master/289-game-of-life) \\\n[300-longest-increasing-subsequence](https://github.com/akankshakumari393/leetcode/tree/master/300-longest-increasing-subsequence) \\\n[328-odd-even-linked-list](https://github.com/akankshakumari393/leetcode/tree/master/328-odd-even-linked-list) \\\n[344-reverse-string](https://github.com/akankshakumari393/leetcode/tree/master/344-reverse-string) \\\n[350-intersection-of-two-arrays-ii](https://github.com/akankshakumari393/leetcode/tree/master/350-intersection-of-two-arrays-ii) \\\n[387-first-unique-character-in-a-string](https://github.com/akankshakumari393/leetcode/tree/master/387-first-unique-character-in-a-string) \\\n[410-split-array-largest-sum](https://github.com/akankshakumari393/leetcode/tree/master/410-split-array-largest-sum) \\\n[461-hamming-distance](https://github.com/akankshakumari393/leetcode/tree/master/461-hamming-distance) \\\n[520-detect-capital](https://github.com/akankshakumari393/leetcode/tree/master/520-detect-capital) \\\n[540-single-element-in-a-sorted-array](https://github.com/akankshakumari393/leetcode/tree/master/540-single-element-in-a-sorted-array) \\\n[543-diameter-of-binary-tree](https://github.com/akankshakumari393/leetcode/tree/master/543-diameter-of-binary-tree) \\\n[559-maximum-depth-of-n-ary-tree](https://github.com/akankshakumari393/leetcode/tree/master/559-maximum-depth-of-n-ary-tree) \\\n[566-reshape-the-matrix](https://github.com/akankshakumari393/leetcode/tree/master/566-reshape-the-matrix) \\\n[576-out-of-boundary-paths](https://github.com/akankshakumari393/leetcode/tree/master/576-out-of-boundary-paths) \\\n[680-valid-palindrome-ii](https://github.com/akankshakumari393/leetcode/tree/master/680-valid-palindrome-ii) \\\n[637-average-of-levels-in-binary-tree](https://github.com/akankshakumari393/leetcode/tree/master/637-average-of-levels-in-binary-tree) \\\n[695-max-area-of-island](https://github.com/akankshakumari393/leetcode/tree/master/695-max-area-of-island) \\\n[704-binary-search](https://github.com/akankshakumari393/leetcode/tree/master/704-binary-search) \\\n[705-design-hashset](https://github.com/akankshakumari393/leetcode/tree/master/705-design-hashset) \\\n[729-my-calendar-i](https://github.com/akankshakumari393/leetcode/tree/master/729-my-calendar-i) \\\n[746-min-cost-climbing-stairs](https://github.com/akankshakumari393/leetcode/tree/master/746-min-cost-climbing-stairs) \\\n[792-number-of-matching-subsequences](https://github.com/akankshakumari393/leetcode/tree/master/792-number-of-matching-subsequences) \\\n[804-unique-morse-code-words](https://github.com/akankshakumari393/leetcode/tree/master/804-unique-morse-code-words) \\\n[858-mirror-reflection](https://github.com/akankshakumari393/leetcode/tree/master/858-mirror-reflection) \\\n[875-koko-eating-bananas](https://github.com/akankshakumari393/leetcode/tree/master/875-koko-eating-bananas) \\\n[876-middle-of-the-linked-list](https://github.com/akankshakumari393/leetcode/tree/master/876-middle-of-the-linked-list) \\\n[890-find-and-replace-pattern](https://github.com/akankshakumari393/leetcode/tree/master/890-find-and-replace-pattern) \\\n[895-maximum-frequency-stack](https://github.com/akankshakumari393/leetcode/tree/master/895-maximum-frequency-stack) \\\n[997-find-the-town-judge](https://github.com/akankshakumari393/leetcode/tree/master/997-find-the-town-judge) \\\n[1011-capacity-to-ship-packages-within-d-days](https://github.com/akankshakumari393/leetcode/tree/master/1011-capacity-to-ship-packages-within-d-days) \\\n[1283-find-the-smallest-divisor-given-a-threshold](https://github.com/akankshakumari393/leetcode/tree/master/1283-find-the-smallest-divisor-given-a-threshold) \\\n[1329-sort-the-matrix-diagonally](https://github.com/akankshakumari393/leetcode/tree/master/1329-sort-the-matrix-diagonally) \\\n[1448-count-good-nodes-in-binary-tree](https://github.com/akankshakumari393/leetcode/tree/master/1448-count-good-nodes-in-binary-tree) \\\n[1482-minimum-number-of-days-to-make-m-bouquets](https://github.com/akankshakumari393/leetcode/tree/master/1482-minimum-number-of-days-to-make-m-bouquets) \\\n[1539-kth-missing-positive-number](https://github.com/akankshakumari393/leetcode/tree/master/1539-kth-missing-positive-number) \\\n[1603-design-parking-system](https://github.com/akankshakumari393/leetcode/tree/master/1603-design-parking-system) \\\n[1791-find-center-of-star-graph](https://github.com/akankshakumari393/leetcode/tree/master/1791-find-center-of-star-graph) \\\n[2013-detect-squares](https://github.com/akankshakumari393/leetcode/tree/master/2013-detect-squares) \\\n[2296-design-a-text-editor](https://github.com/akankshakumari393/leetcode/tree/master/2296-design-a-text-editor) \\\n[2351-first-letter-to-appear-twice](https://github.com/akankshakumari393/leetcode/tree/master/2351-first-letter-to-appear-twice)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakankshakumari393%2Fleetcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakankshakumari393%2Fleetcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakankshakumari393%2Fleetcode/lists"}