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