{"id":21722772,"url":"https://github.com/vishwac09/leet-codes","last_synced_at":"2025-03-20T22:15:22.907Z","repository":{"id":48828039,"uuid":"362132239","full_name":"vishwac09/leet-codes","owner":"vishwac09","description":"Collection of Examples solved on LeetCode","archived":false,"fork":false,"pushed_at":"2024-09-22T17:40:27.000Z","size":487,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-25T19:08:08.660Z","etag":null,"topics":["leetcode","leetcode-solutions"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/vishwac09.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}},"created_at":"2021-04-27T13:59:36.000Z","updated_at":"2024-09-22T17:40:30.000Z","dependencies_parsed_at":"2024-11-26T03:17:50.915Z","dependency_job_id":null,"html_url":"https://github.com/vishwac09/leet-codes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vishwac09%2Fleet-codes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vishwac09%2Fleet-codes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vishwac09%2Fleet-codes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vishwac09%2Fleet-codes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vishwac09","download_url":"https://codeload.github.com/vishwac09/leet-codes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244700595,"owners_count":20495574,"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":["leetcode","leetcode-solutions"],"created_at":"2024-11-26T02:32:47.920Z","updated_at":"2025-03-20T22:15:22.879Z","avatar_url":"https://github.com/vishwac09.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LeetCodes\n\n[![Run Test cases on LeetCodes repository](https://github.com/vishwac09/leet-codes/actions/workflows/leet-code-run-tests.yml/badge.svg?branch=master)](https://github.com/vishwac09/leet-codes/actions/workflows/leet-code-run-tests.yml)\n\nCollection of Examples solved on www.leetcode.com\n\n## Running Test Cases\n\n```\n./vendor/bin/phpunit --colors=auto tests\nnpm run tests\n```\n\n## Problems\n\n- [Two Sum](https://leetcode.com/problems/two-sum) [PHP | JS]\n- [Add Two Numbers](https://leetcode.com/problems/add-two-numbers)\n- [Longest Substring Without Repeating Characters](https://leetcode.com/problems/longest-substring-without-repeating-characters) [PHP | JS]\n- [Median of Two Sorted Arrays](https://leetcode.com/problems/median-of-two-sorted-arrays) [PHP | JS]\n- [ZigZag Conversion](https://leetcode.com/problems/zigzag-conversion) [PHP | JS]\n- [Reverse Integer](https://leetcode.com/problems/reverse-integer) [PHP | JS]\n- [String to Integer (atoi)](https://leetcode.com/problems/string-to-integer-atoi) [PHP | JS]\n- [Palindrome Number](https://leetcode.com/problems/palindrome-number) [PHP | JS]\n- [Regular Expression Matching](https://leetcode.com/problems/regular-expression-matching) (https://www.youtube.com/watch?v=HAA8mgxlov8\u0026t=2s)\n- [Maximum Product Difference Between Two Pairs](https://leetcode.com/problems/maximum-product-difference-between-two-pairs/) [PHP | JS]\n- [Number Complement](https://leetcode.com/problems/number-complement/) [PHP | JS]\n- [Increasing Subsequences](https://leetcode.com/problems/increasing-subsequences/)\n- [Three Sum](https://leetcode.com/problems/3sum/)\n- [Roman To Integer](https://leetcode.com/problems/roman-to-integer/)\n- [Longest Common Prefix](https://leetcode.com/problems/longest-common-prefix/)\n- [Valid Parentheses](https://leetcode.com/problems/valid-parentheses/)\n- [Merge Two Sorted Arrays](https://leetcode.com/problems/merge-two-sorted-lists/)\n- [Remove Duplicates from Sorted Array](https://leetcode.com/problems/remove-duplicates-from-sorted-array/)\n- [Remove Element](https://leetcode.com/problems/remove-element/)\n- [Implement strStr()](https://leetcode.com/problems/implement-strstr/)\n- [Search Insert Position](https://leetcode.com/problems/search-insert-position/)\n- [Maximum Subarray](https://leetcode.com/problems/maximum-subarray/)\n- [Length of Last Word](https://leetcode.com/problems/length-of-last-word/)\n- [Plus One](https://leetcode.com/problems/plus-one/)\n- [Add Binary](https://leetcode.com/problems/add-binary/)\n- [Sqrt(x)](https://leetcode.com/problems/sqrtx/)\n- [Climbing Stairs](https://leetcode.com/problems/climbing-stairs/)\n- [Remove Duplicates from Sorted List](https://leetcode.com/problems/remove-duplicates-from-sorted-list/)\n- [Merge Sorted Array](https://leetcode.com/problems/merge-sorted-array/)\n- [Binary Tree Inorder Traversal](https://leetcode.com/problems/binary-tree-inorder-traversal/)\n- [Same Tree](https://leetcode.com/problems/same-tree/)\n- [Valid Palindrome](https://leetcode.com/problems/valid-palindrome/)\n- [Number of 1 Bits](https://leetcode.com/problems/number-of-1-bits/)\n- [Reverse Bits](https://leetcode.com/problems/reverse-bits/)\n- [Excel Sheet Column Number](https://leetcode.com/problems/excel-sheet-column-number/)\n- [Excel Sheet Column Title](https://leetcode.com/problems/excel-sheet-column-title/)\n- [Majority Element](https://leetcode.com/problems/majority-element/)\n- [Min Stack](https://leetcode.com/problems/min-stack/)\n- [Binary Tree Postorder Traversal](https://leetcode.com/problems/binary-tree-postorder-traversal/)\n- [Binary Tree Preorder Traversal](https://leetcode.com/problems/binary-tree-preorder-traversal/)\n- [SingleNumber](https://leetcode.com/problems/single-number/)\n- [Best Time Buy Sell Stock](https://leetcode.com/problems/best-time-to-buy-and-sell-stock/)\n- [Linked List Cycle](https://leetcode.com/problems/linked-list-cycle/)\n- [Search in a Binary Search Tree](https://leetcode.com/problems/search-in-a-binary-search-tree/)\n- [Path Sum](https://leetcode.com/problems/path-sum/)\n- [Trim a Binary Search Tree](https://leetcode.com/problems/trim-a-binary-search-tree/)\n- [Pascal's Triangle](https://leetcode.com/problems/pascals-triangle/)\n- [Pascal's Triangle II](https://leetcode.com/problems/pascals-triangle-ii/)\n- [Path Sum II](https://leetcode.com/problems/path-sum-ii/)\n- [Convert BST to Greater Tree](https://leetcode.com/problems/convert-bst-to-greater-tree/)\n- [Binary Search Tree to Greater Sum Tree](https://leetcode.com/problems/binary-search-tree-to-greater-sum-tree/)\n- [Minimum Depth of Binary Tree](https://leetcode.com/problems/minimum-depth-of-binary-tree/)\n- [Maximum Depth of Binary Tree](https://leetcode.com/problems/maximum-depth-of-binary-tree/)\n- [Reverse Linked List](https://leetcode.com/problems/reverse-linked-list/)\n- [Increasing Order Search Tree](https://leetcode.com/problems/increasing-order-search-tree/)\n- [Kth Smallest Element in a BST](https://leetcode.com/problems/kth-smallest-element-in-a-bst/)\n- [Remove Nth Node From End of List](https://leetcode.com/problems/remove-nth-node-from-end-of-list/)\n- [Recover Binary Search Tree](https://leetcode.com/problems/recover-binary-search-tree/)\n- [Convert Sorted Array to Binary Search Tree](https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/)\n- [Binary Search Tree Iterator](https://leetcode.com/problems/binary-search-tree-iterator/)\n- [Design HashSet](https://leetcode.com/problems/design-hashset/)\n- [Happy Number](https://leetcode.com/problems/happy-number/)\n- [Remove Linked List Elements](https://leetcode.com/problems/remove-linked-list-elements/)\n- [Contains Duplicate](https://leetcode.com/problems/contains-duplicate/)\n- [Design HashMap](https://leetcode.com/problems/design-hashmap/)\n- [Implement Stack using Queues](https://leetcode.com/problems/implement-stack-using-queues/)\n- [Encode and Decode TinyURL](https://leetcode.com/problems/encode-and-decode-tinyurl/)\n- [Container With Most Water](https://leetcode.com/problems/container-with-most-water/)\n- [Design Underground System](https://leetcode.com/problems/design-underground-system/)\n- [Ransom note](https://leetcode.com/problems/ransom-note/)\n- [Contains Duplicate II](https://leetcode.com/problems/contains-duplicate-ii/)\n- [Isomorphic Strings](https://leetcode.com/problems/isomorphic-strings/)\n- [Intersection of Two Linked Lists](https://leetcode.com/problems/intersection-of-two-linked-lists/)\n- [Symmetric Tree](https://leetcode.com/problems/symmetric-tree/)\n- [Summary Ranges](https://leetcode.com/problems/summary-ranges/)\n- [Peeking Iterator](https://leetcode.com/problems/peeking-iterator/)\n- [Balanced Binary Tree](https://leetcode.com/problems/balanced-binary-tree/)\n- [Valid Perfect Square](https://leetcode.com/problems/valid-perfect-square/)\n- [Power of Two](https://leetcode.com/problems/power-of-two/)\n- [Implement Queue Stacks](https://leetcode.com/problems/implement-queue-using-stacks/)\n- [Palindrome Linked List](https://leetcode.com/problems/palindrome-linked-list/)\n- [Delete Node in a Linked List](https://leetcode.com/problems/delete-node-in-a-linked-list/)\n- [Valid Anagram](https://leetcode.com/problems/valid-anagram/)\n- [Backspace String Compare](https://leetcode.com/problems/backspace-string-compare/)\n- [First Unique Character in a String](https://leetcode.com/problems/first-unique-character-in-a-string/)\n- [Binary Tree Paths](https://leetcode.com/problems/binary-tree-paths/)\n- [Add Digits](https://leetcode.com/problems/add-digits/)\n- [Sort Array By Parity](https://leetcode.com/problems/sort-array-by-parity/)\n- [Invert Binary Tree](https://leetcode.com/problems/invert-binary-tree/)\n- [Shortest Unsorted Continuous Subarray](https://leetcode.com/problems/shortest-unsorted-continuous-subarray/)\n- [Max Number of K-Sum Pairs](https://leetcode.com/problems/max-number-of-k-sum-pairs/)\n- [Find the Difference](https://leetcode.com/problems/find-the-difference/)\n- [Implement Stack using Queues](https://leetcode.com/problems/implement-stack-using-queues/)\n- [Remove Outermost Parentheses](https://leetcode.com/problems/remove-outermost-parentheses/)\n- [Count Prefixes of a Given String](https://leetcode.com/problems/count-prefixes-of-a-given-string/)\n- [Remove All Adjacent Duplicates in String II](https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string-ii/)\n- [132 Pattern](https://leetcode.com/problems/132-pattern/)\n- [Replace Elements with Greatest Element on Right Side](https://leetcode.com/problems/replace-elements-with-greatest-element-on-right-side/)\n- [Flatten Nested List Iterator](https://leetcode.com/problems/flatten-nested-list-iterator/)\n- [Letter Combinations of a Phone Number](https://leetcode.com/problems/letter-combinations-of-a-phone-number/)\n- [Merge k Sorted Lists](https://leetcode.com/problems/merge-k-sorted-lists/)\n- [Divide Two Integers](https://leetcode.com/problems/divide-two-integers/)\n- [Sum of Left Leaves](https://leetcode.com/problems/sum-of-left-leaves/)\n- [Combination Sum III](https://leetcode.com/problems/combination-sum-iii/)\n- [Combination Sum](https://leetcode.com/problems/combination-sum/)\n- [Count Sorted Vowel Strings](https://leetcode.com/problems/count-sorted-vowel-strings/)\n- [Populating Next Right Pointers in Each Node II](https://leetcode.com/problems/populating-next-right-pointers-in-each-node-ii/)\n- [Intersection of Two Arrays](https://leetcode.com/problems/intersection-of-two-arrays/)\n- [Intersection of Multiple Arrays](https://leetcode.com/problems/intersection-of-multiple-arrays/)\n- [Intersection of Two Arrays II](https://leetcode.com/problems/intersection-of-two-arrays-ii/)\n- [Palindromic Substrings](https://leetcode.com/problems/palindromic-substrings/)\n- [Ones and Zeroes](https://leetcode.com/problems/ones-and-zeroes/)\n- [Counting Bits](https://leetcode.com/problems/counting-bits/)\n- [Number of Steps to Reduce a Number to Zero](https://leetcode.com/problems/number-of-steps-to-reduce-a-number-to-zero/)\n- [Missing Number](https://leetcode.com/problems/missing-number/)\n- [Running Sum of 1d Array](https://leetcode.com/problems/running-sum-of-1d-array/)\n- [Richest Customer Wealth](https://leetcode.com/problems/richest-customer-wealth/)\n- [Transpose Matrix](https://leetcode.com/problems/transpose-matrix/)\n- [Move Zeroes](https://leetcode.com/problems/move-zeroes/)\n- [Reverse String](https://leetcode.com/problems/reverse-string/)\n- [Guess Number Higher or Lower](https://leetcode.com/problems/guess-number-higher-or-lower/)\n- [Remove Palindromic Subsequences](https://leetcode.com/problems/remove-palindromic-subsequences/)\n- [Two Sum II](https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/)\n- [Triangle](https://leetcode.com/problems/triangle/)\n- [Search Suggestions System](https://leetcode.com/problems/search-suggestions-system/)\n- [Kth Largest Element in an Array](https://leetcode.com/problems/kth-largest-element-in-an-array/)\n- [Final Value of Variable After Performing Operations](https://leetcode.com/problems/final-value-of-variable-after-performing-operations/)\n- [Non-decreasing Array](https://leetcode.com/problems/non-decreasing-array/)\n- [Min Cost Climbing Stairs](https://leetcode.com/problems/min-cost-climbing-stairs/)\n- [Detect Capital](https://leetcode.com/problems/detect-capital/description/)\n- [Delete Columns to Make Sorted](https://leetcode.com/problems/delete-columns-to-make-sorted/)\n- [Minimum Rounds to Complete All Tasks](https://leetcode.com/problems/minimum-rounds-to-complete-all-tasks/)\n- [Minimum Number of Arrows to Burst Balloons](https://leetcode.com/problems/minimum-number-of-arrows-to-burst-balloons)\n- [Maximum Ice Cream Bars](https://leetcode.com/problems/maximum-ice-cream-bars/)\n- [Kids With the Greatest Number of Candies](https://leetcode.com/problems/kids-with-the-greatest-number-of-candies/description/)\n- [First Bad Version](https://leetcode.com/problems/first-bad-version/description/)\n- [Nim Game](https://leetcode.com/problems/nim-game/description/)\n- [Fizz Buzz](https://leetcode.com/problems/fizz-buzz/description/)\n- [Third Maximum Number](https://leetcode.com/problems/third-maximum-number/description/)\n- [Count Complete Tree Nodes](https://leetcode.com/problems/count-complete-tree-nodes/)\n- [Is Power of Three](https://leetcode.com/problems/power-of-three/submissions/1219983297/)\n- [Power of Four](https://leetcode.com/problems/power-of-four/description/) PHP | JS\n- [Reverse Vowels of String](https://leetcode.com/problems/reverse-vowels-of-a-string/description/)\n- [Range Sum Query - Immutable](https://leetcode.com/problems/range-sum-query-immutable/description/)\n- [Kth Largest Element in a stream](https://leetcode.com/problems/kth-largest-element-in-a-stream/submissions/1352890317/?envType=daily-question\u0026envId=2024-08-12) JS\n- [Keyboard Row](https://leetcode.com/problems/keyboard-row/description/) JS\n- [License Key Formatting](https://leetcode.com/problems/license-key-formatting/description/) JS\n- [Lemonade Change](https://leetcode.com/problems/lemonade-change/description/?envType=daily-question\u0026envId=2024-08-15) JS\n- [Count Segments](https://leetcode.com/problems/number-of-segments-in-a-string/description/) JS\n- [Arranging Coins](https://leetcode.com/problems/arranging-coins/description/) JS\n- [Distribute Candies](https://leetcode.com/problems/distribute-candies/description/) JS\n- [Next Greated Element I](https://leetcode.com/problems/next-greater-element-i/description/) JS\n- [Island Perimeter](https://leetcode.com/problems/island-perimeter/description/) JS\n- [Teemo Attackig](https://leetcode.com/problems/teemo-attacking/submissions/1369990814/) JS\n- [Max Consecutive ones](https://leetcode.com/problems/max-consecutive-ones/description/) JS\n- [Assign Cookies](https://leetcode.com/problems/assign-cookies/description/) JS\n- [Relative Ranks](https://leetcode.com/problems/relative-ranks/description/) JS\n- [Check if Two Chessboard Squares Have the Same Color](https://leetcode.com/problems/check-if-two-chessboard-squares-have-the-same-color/description/) JS\n- [K-th Nearest Obstacle Queries](https://leetcode.com/problems/k-th-nearest-obstacle-queries/description/) JS\n- [Find the Student that Will Replace the Chalk](https://leetcode.com/problems/find-the-student-that-will-replace-the-chalk/description/) JS\n- [Sum of Digits of String After Convert](https://leetcode.com/problems/sum-of-digits-of-string-after-convert/description/) JS\n- [Walking Robot Simulation](https://leetcode.com/problems/walking-robot-simulation/description/?envType=daily-question\u0026envId=2024-09-04) JS\n- [Middle of the Linked List](https://leetcode.com/problems/middle-of-the-linked-list/description/) JS\n- [Find Missing Observations](https://leetcode.com/problems/find-missing-observations/description/) JS\n- [Fibonacci Number](https://leetcode.com/problems/fibonacci-number/description/) JS\n- [Delete Nodes From Linked List Present in Array](https://leetcode.com/problems/delete-nodes-from-linked-list-present-in-array/description/) JS\n- [Linked List in Binary Tree](https://leetcode.com/problems/linked-list-in-binary-tree/description/) JS\n- [Split Linked List in Parts](https://leetcode.com/problems/split-linked-list-in-parts/description/) Js\n- [Spiral Matrix IV](https://leetcode.com/problems/spiral-matrix-iv/description/) JS\n- [Add Strings](https://leetcode.com/problems/add-strings/description/) JS\n- [Reverse Words in a String III](https://leetcode.com/problems/reverse-words-in-a-string-iii/description/) JS\n- [Divide Two Integers](https://leetcode.com) JS\n- [Insert Greatest Common Divisors in Linked List](https://leetcode.com/problems/insert-greatest-common-divisors-in-linked-list/description/) JS\n- [Minimum Operations to Exceed Threshold Value I](https://leetcode.com/problems/minimum-operations-to-exceed-threshold-value-i/description/)\n- [Minimum Bit Flips to Convert Number](https://leetcode.com/problems/minimum-bit-flips-to-convert-number/description/)\n- [Count the Number of Consistent Strings](https://leetcode.com/problems/count-the-number-of-consistent-strings/description/) JS\n- [Binary Number with Alternating Bits](https://leetcode.com/problems/binary-number-with-alternating-bits/description/) JS\n- [Perfect Number](https://leetcode.com/problems/perfect-number/description/)\n- [XOR Queries of a Subarray](https://leetcode.com/problems/xor-queries-of-a-subarray/description/) JS\n- [Find All Numbers Disappeared in an Array](https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array/description/) JS\n- [Longest Subarray With Maximum Bitwise AND](https://leetcode.com/problems/longest-subarray-with-maximum-bitwise-and/description) JS\n- [Find the Longest Substring Containing Vowels in Even Counts](https://leetcode.com/problems/find-the-longest-substring-containing-vowels-in-even-counts/description) JS\n- [Minimum Time Difference](https://leetcode.com/problems/minimum-time-difference/description/) JS\n- [Uncommon Words from Two Sentences](https://leetcode.com/problems/uncommon-words-from-two-sentences/description/) JS\n- [Can place flowers](https://leetcode.com/problems/can-place-flowers/description/) JS\n- [Largest Number](https://leetcode.com/problems/largest-number/description/) JS\n- [Permutations](https://leetcode.com/problems/permutations/) JS\n- [Different Ways to Add Parentheses](https://leetcode.com/problems/different-ways-to-add-parentheses/description/) JS\n- [The Two Sneaky Numbers of Digitville](https://leetcode.com/problems/the-two-sneaky-numbers-of-digitville/description/) JS\n- [Shortest Palindrome](https://leetcode.com/problems/shortest-palindrome/description/) JS\n- [Lexicographical Numbers](https://leetcode.com/problems/lexicographical-numbers/description/) JS\n- [K-th Smallest in Lexicographical Order](https://leetcode.com/problems/k-th-smallest-in-lexicographical-order/description/) JS\n\n\n## Unsolved\n\n- [Longest Palindromic Substring](https://leetcode.com/problems/longest-palindromic-substring)\n- [Min Cost to Connect All Points](https://leetcode.com/problems/min-cost-to-connect-all-points/)\n- [Binary Number with Alternating Bits](https://leetcode.com/problems/binary-number-with-alternating-bits/)\n- [Word Pattern](https://leetcode.com/problems/word-pattern/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvishwac09%2Fleet-codes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvishwac09%2Fleet-codes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvishwac09%2Fleet-codes/lists"}