Mrtj2016 / leetcode

🤭 LeetCode solutions in Java/Python/CPP/Ruby/JS/Scala/Go...

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LeetCode-GitHub-yanglbme

Language PRs Welcome issues stars forks

Introduction

Complete solutions to Leetcode problems, updated daily.

Solution List

Easy

# Title Tags
0001 Two Sum Array, Hash Table
0007 Reverse Integer Math
0009 Palindrome Number Math
0013 Roman to Integer Math, String
0014 Longest Common Prefix String
0020 Valid Parentheses String, Stack
0021 Merge Two Sorted Lists Linked List
0028 Implement strStr() Two Pointers, String
0035 Search Insert Position Array, Binary Search
0053 Maximum Subarray Array, Divide and Conquer, Dynamic Programming
0070 Climbing Stairs Dynamic Programming
0083 Remove Duplicates from Sorted List Linked List
0136 Single Number Hash Table, Bit Manipulation
0141 Linked List Cycle Linked List, Two Pointers
0155 Min Stack Stack, Design
0175 Combine Two Tables SQL
0176 Second Highest Salary SQL
0181 Employees Earning More Than Their Managers SQL
0182 Duplicate Emails SQL
0183 Customers Who Never Order SQL
0189 Rotate Array Array
0196 Delete Duplicate Emails SQL
0197 Rising Temperature SQL
0198 House Robber Dynamic Programming
0203 Remove Linked List Elements Linked List
0231 Power of Two Math, Bit Manipulation
0234 Palindrome Linked List Linked List, Two Pointers
0235 Lowest Common Ancestor of a Binary Search Tree Tree
0237 Delete Node in a Linked List Linked List
0344 Reverse String Two Pointers, String
0581 Shortest Unsorted Continuous Subarray Array
0595 Big Countries SQL
0596 Classes More Than 5 Students SQL
0605 Can Place Flowers Array
0620 Not Boring Movies SQL
0627 Swap Salary SQL
0695 Max Area of Island Array, Depth-first Search
0703 Kth Largest Element in a Stream Heap
0707 Design Linked List Linked List, Design
0876 Middle of the Linked List Linked List

Medium

# Title Tags
0002 Add Two Numbers Linked List, Math
0003 Longest Substring Without Repeating Characters Hash Table, Two Pointers, String
0005 Longest Palindromic Substring String, Dynamic Programming
0015 3Sum Array, Two Pointers
0018 4Sum Array, Hash Table, Two Pointers
0019 Remove Nth Node From End of List Linked List, Two Pointers
0024 Swap Nodes in Pairs Linked List
0031 Next Permutation Array
0046 Permutations Backtracking
0047 Permutations II Backtracking
0054 Spiral Matrix Array
0059 Spiral Matrix II Array
0061 Rotate List Linked List, Two Pointers
0062 Unique Paths Array, Dynamic Programming
0063 Unique Paths II Array, Dynamic Programming
0075 Sort Colors Array, Two Pointers, Sort
0082 Remove Duplicates from Sorted List II Linked List
0086 Partition List Linked List, Two Pointers
0092 Reverse Linked List II Linked List
0094 Binary Tree Inorder Traversal Hash Table, Stack, Tree
0096 Unique Binary Search Trees Tree, Dynamic Programming
0102 Binary Tree Level Order Traversal Tree, Breadth-first Search
0105 Construct Binary Tree from Preorder and Inorder Traversal Array, Tree, Depth-first Search
0106 Construct Binary Tree from Inorder and Postorder Traversal Array, Tree, Depth-first Search
0127 Word Ladder Breadth-first Search
0130 Surrounded Regions Depth-first Search, Breadth-first Search, Union Find
0137 Single Number II Bit Manipulation
0138 Copy List with Random Pointer Hash Table, Linked List
0142 Linked List Cycle II Linked List, Two Pointers
0143 Reorder List Linked List
0144 Binary Tree Preorder Traversal Stack, Tree
0150 Evaluate Reverse Polish Notation Stack
0153 Find Minimum in Rotated Sorted Array Array, Binary Search
0177 Nth Highest Salary SQL
0178 Rank Scores SQL
0180 Consecutive Numbers SQL
0184 Department Highest Salary SQL
0300 Longest Increasing Subsequence Binary Search, Dynamic Programming
0328 Odd Even Linked List Linked List
0343 Integer Break Math, Dynamic Programming
0817 Linked List Components Linked List
0938 Range Sum of BST Binary Search Tree

Hard

# Title Tags
0004 Median of Two Sorted Arrays Array, Binary Search, Divide and Conquer
0023 Merge k Sorted Lists Linked List, Divide and Conquer, Heap
0032 Longest Valid Parentheses String, Dynamic Programming
0084 Largest Rectangle in Histogram Array, Stack
0145 Binary Tree Postorder Traversal Stack, Tree
0295 Find Median from Data Stream Heap, Design
0312 Burst Balloons Divide and Conquer, Dynamic Programming

Contributions

I'm looking for long-term contributors/partners to this repo! Send me PRs if you're interested! See the following:

  • Fork this repository to your own GitHub account and then clone it to your local device.
  • Add or update file of the repository, then commit and push it to your GitHub repository.
  • Submit a pull request with your changes!
  • For more details, see CONTRIBUTING.md

how-to-contribute

Contributors

" If you want to go fast, go alone. If you want to go far, go together. And that's the spirit of teamwork ".

About

🤭 LeetCode solutions in Java/Python/CPP/Ruby/JS/Scala/Go...

License:Other


Languages

Language:Java 40.9%Language:C++ 27.9%Language:Python 18.3%Language:JavaScript 9.9%Language:Ruby 2.5%Language:C 0.2%Language:Scala 0.2%Language:Go 0.1%