Git Product home page Git Product logo

leetcode's Introduction

LeetCode

Problems

# Difficulty Title Solutions Tag
1 Easy Two Sum Array, Hash Table
15 Medium 3 Sum Array, Two Pointers
19 Medium Remove Nth Node From End of List Linked List
21 Easy Merge Two Sorted Lists Linked List
26 Easy Remove Duplicates from Sorted Array Array
33 Medium Search in Rotated Sorted Array Array, Binary Search
34 Medium Find First and Last Position of Element in Sorted Array Array, Binary Search
39 Medium Combination Sum Backtracking
46 Easy Permutations Backtracking
51 Hard N-Queens Backtracking
53 Medium Maximum Subarray Array, Dynamic Programming, Kadane Algorithm, Divide and Conquer
54 Medium Spiral Matrix Array
56 Medium Merge Intervals Array, Graph, Connected Component
62 Medium Unique Paths Dynamic Programming
66 Easy Plus One Array
69 Easy Sqrt(x) Binary Search
70 Easy Climbing Stairs Dynamic Programming
72 Hard Edit Distance Dynamic Programming
75 Hard Sort Colors Dynamic Programming
83 Easy Remove Duplicates from Sorted List Linked List
94 Medium Binary Tree Inorder Traversal Binary Tree, Morris Traversal
98 Medium Validate Binary Search Tree Linked List
101 Easy Symmetric Tree BFS
102 Medium Binary Tree Level Order Traversal BFS
104 Easy Maximum Depth of Binary Tree BST
108 Easy Convert Sorted Array to Binary Search Tree BST
110 Easy Balanced Binary Tree BST
112 Easy Path Sum Binary Tree
121 Easy Best Time to Buy and Sell Stock Dynamic Programming
122 Easy Best Time to Buy and Sell Stock II Array
125 Easy Valid Palindrome String, Two Pointers
130 Medium Surrounded Regions DFS
134 Medium Gas Station Array
141 Easy Linked List Cycle Linked List, Floyd's Cycle Finding Algorithm
144 Medium Binary Tree Preorder Traversal Binary Tree, Morris Traversal
145 Medium Binary Tree Postorder Traversal Binary Tree
146 Medium LRU Cache LinkedHashMap
150 Medium Evaluate Reverse Polish Notation Stack
151 Medium Reverse Words in a String String
160 Easy Intersection of Two Linked Lists Linked List
162 Medium Find Peak Element Array
167 Easy Two Sum II - Input array is sorted Array, Two Pointers
198 Medium House Robber Dynamic Programming
200 Medium Number of Islands 2D Array, DFS
206 Easy Reverse Linked List Linked List
207 Medium Course Schedule Topological Sort
210 Medium Course Schedule II Topological Sort
215 Medium Kth Largest Element in an Array Heap, Quickselect
226 Easy Invert Binary Tree Array
230 Medium Kth Smallest Element in a BST Array
234 Easy Palindrome Linked List Linked List
235 Medium Lowest Common Ancestor of a Binary Search Tree Binary Search Tree
237 Easy Delete Node in a Linked List BST
238 Medium Product of Array Except Self Array
266 Easy Palindrome Permutation String
270 Easy Closest Binary Search Tree Value BST, Binary Search
283 Easy Move Zeroes Array
285 Medium Inorder Successor in BST BST
287 Medium Find the Duplicate Number Array, HashSet
322 Medium Coin Change Dynamic Programming
346 Easy Moving Average from Data Stream Queue
349 Easy Intersection of Two Arrays Array
359 Easy Logger Rate Limiter HashMap
383 Easy Ransom Note HashMap
387 Easy First Unique Character in a String String
392 Easy Is Subsequence Array, Two Pointers
443 Medium String Compression BST
450 Medium Delete Node in a BST BST
509 Easy Fibonacci Number Recursion
511 Easy Game Play Analysis I SQL
542 Medium 01 Matrix BST
543 Easy Diameter of Binary Tree BST
547 Medium Number of Provinces Union Find
586 Easy Customer Placing the Largest Number of Orders SQL
595 Easy Big Countries SQL
613 Easy Shortest Distance in a Line SQL
622 Medium Design Circular Queue Array
627 Easy Swap Salary SQL
684 Medium Redundant Connection Union Find
701 Medium Insert into a Binary Search Tree BST
704 Easy Binary Search Array, Binary Search
709 Easy To Lower Case String
743 Medium Network Delay Time Dijkstra's Algorithm
746 Easy Min Cost Climbing Stairs Dynamic Programming
760 Easy Find Anagram Mappings Array, HashTable
771 Easy Jewels and Stones Array, HashSet
787 Medium Cheapest Flights Within K Stops Dijkstra's Algorithm
841 Medium Keys and Rooms DFS
845 Medium Longest Mountain in Array Array
896 Easy Monotonic Array Array
938 Easy Range Sum of BST BST
947 Medium Most Stones Removed with Same Row or Column Union Find
973 Medium K Closest Points to Origin Heap
977 Easy Squares of a Sorted Array Array, Two Pointers
994 Medium Rotting Oranges BST Pointers
1008 Medium Construct Binary Search Tree from Preorder Traversal BST
1020 Medium Number of Enclaves DFS
1069 Easy Product Sales Analysis II SQL
1091 Medium Shortest Path in Binary Matrix BFS
1108 Easy Defanging an IP Address String
1119 Easy Remove Vowels from a String String
1162 Medium As Far from Land as Possible String
1173 Easy Single-Row Keyboard String
1200 Easy Minimum Absolute Difference Array, Sorting
1303 Easy Find the Team Size SQL
1334 Medium Find the City With the Smallest Number of Neighbors at a Threshold Distance Dijkstra's Algorithm
1350 Easy Students With Invalid Departments SQL
1378 Easy Replace Employee ID With The Unique Identifier SQL
1431 Easy Kids With the Greatest Number of Candies Array
1464 Easy Maximum Product of Two Elements in an Array Array
1470 Easy Shuffle the Array Array
1480 Easy Running Sum of 1d Array Array
1512 Easy Number of Good Pairs Array
1571 Easy Warehouse Manager SQL
1581 Easy Customer Who Visited but Did Not Make Any Transactions SQL
1587 Easy Bank Account Summary II SQL
1623 Easy All Valid Triplets That Can Represent a Country SQL
1672 Easy Richest Customer Wealth Array
1683 Easy Invalid Tweets SQL
1693 Easy Recyclable and Low Fat Products SQL
1741 Easy Find Total Time Spent by Each Employee SQL
1757 Easy Recyclable and Low Fat Products SQL
1821 Easy Find Customers With Positive Revenue this Year SQL
1853 Easy Convert Date Format SQL

Snippets

Convert List to int[]

List<Integer> list = new ArrayList<>();
int[] array = list.stream().mapToInt(i->i).toArray();

Convert int[] to List

int[] nums = new int[]{1, 2, 3};
List<Integer> numList = Arrays.stream(nums).boxed().collect(Collectors.toList());

leetcode's People

Contributors

gnodivad avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.