Leetcode
All Python solutions for Leetcode
Install / Use
/learn @cnkyrpsgl/LeetcodeREADME
Leetcode Python solutions
About
This repository includes my solutions to all Leetcode algorithm questions. This problems mostly consist of real interview questions that are asked on big companies like Facebook, Amazon, Netflix, Google etc. If you find my solutions hard to comprehend, give yourself a time to solve easier questions or check discussion section to problem on LeetCode. Feel free to contact me for improvements :smiley:
Prerequisites
Some problems may need premium subscription on LeetCode to unlock it!
import premium
List of Problems
| # | Problem | Solution | | ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | | 1 | Two Sum | python3 | | 2 | Add Two Numbers | python3 | | 3 | Longest Substring Without Repeating Characters | python3 | | 4 | Median of Two Sorted Arrays | python3 | | 5 | Longest Palindromic Substring | python3 | | 6 | ZigZag Conversion | python3 | | 7 | Reverse Integer | python3 | | 8 | String to Integer (atoi) | python3 | | 9 | Palindrome Number | python3 | | 10 | Regular Expression Matching | python3 | | 11 | Container With Most Water | python3 | | 12 | Integer to Roman | python3 | | 13 | Roman to Integer | python3 | | 14 | Longest Common Prefix | python3 | | 15 | 3Sum | python3 | | 16 | 3Sum Closest | python3 | | 17 | Letter Combinations of a Phone Number | python3 | | 18 | 4Sum | python3 | | 19 | Remove Nth Node From End of List | python3 | | 20 | Valid Parentheses | python3 | | 21 | Merge Two Sorted Lists | python3 | | 22 | Generate Parentheses | python3 | | 23 | Merge k Sorted Lists | python3 | | 24 | Swap Nodes in Pairs | python3 | | 25 | Reverse Nodes in k-Group | python3 | | 26 | Remove Duplicates from Sorted Array | python3 | | 27 | Remove Element | python3 | | 28 | Implement strStr() | python3 | | 29 | Divide Two Integers | python3 | | 30 | Substring with Concatenation of All Words | python3 | | 31 | Next Permutation | python3 | | 32 | Longest Valid Parentheses | python3 | | 33 | Search in Rotated Sorted Array | python3 | | 34 | Find First and Last Position of Element in Sorted Array | python3 | | 35 | [Search Insert Position](http
