/leetcode

leetcode python3 solutions

Primary LanguagePython

Leetcode Python3 solutions

png


Tips

Advising add the extension of HTML5 Outliner to your Chrome to view a table of contents. Advicing add


Recursion

Basic

Reverse Linked Lists

Question Number Official Website Link Solution's Link
025 reverse nodes in k group hard
092 reverse linked list II medium
206 reverse linked list easy
234 palindrome linked list easy

Binary Tree

Question Number Official Website Link Solution's Link
105 construct binary tree from preorder and inorder traversal medium
106 construct binary tree from inorder and postorder traversal medium
654 maximum binary tree medium

Math

  1. Binary Exponentiation

Two Pointers

Question Number Official Website Link Solution's Link
005 longest palindromic substring medium
011 container with most water medium
026 remove duplicates from sorted array easy
042 trapping rain water hard
076 minimum window substring hard
141 linked list cycle easy
142 linked list cycle ii medium
189 rotate array medium
283 move zeros easy
287 find the duplicate number medium
344 reverse string easy

Sliding Window

Question Number Official Website Link Solution's Link
239 sliding window maximum hard

Binary Search

Question Number Official Website Link Solution's Link
033 search in rotated sorted array i medium
034 find first and last position of element in sorted array medium
069 sqrtx easy
074 search a 2d matrix medium
081 search in rotated sorted array ii medium
153 find minimum in rotated sorted array medium
240 search a 2d matrix ii medium
540 single element in a sorted array medium
704 binary-search easy
744 find smallest letter greater than target easy
852 peak index in a mountain array easy
875 koko eating bananas medium
1011 capacity to ship packages within d days medium

Stack

Question Number Official Website Link Solution's Link
020 valid parentheses easy
496 next greater element i easy
503 next greater element ii medium
735 asteroid collision medium
739 daily temperatures medium

Hash Map

Question Number Official Website Link Solution's Link
001 Two Sum easy
003 longest substring without repeating characters medium
560 subarray sum equals k medium