Skip to content

renxingkai/LeetCode

Repository files navigation

Fighting for a job!

记录找工作期间搬运的题,全部使用Java实现,本人C++鶸

1 双指针

编号 题目
LeetCode 11 Container With Most Water
LeetCode 19 Remove Nth Node From End of List
LeetCode 42 Trapping Rain Water
LeetCode 61 RotateList
LeetCode 75 Sort Colors
LeetCode 125 Valid Palindrome
LeetCode 167 Two Sum II - Input array is sorted
LeetCode 344 Reverse String
LeetCode 345 Reverse Vowels of a String

2 字符串

编号 题目
LeetCode 3 Longest Substring Without Repeating Characters
LeetCode 13 Roman to Integer
LeetCode 6 ZigZag Conversion
LeetCode 10 Regular Expression Matching
LeetCode 20 Valid Parentheses
LeetCode 22 Generate Parentheses
LeetCode 28 Implement strStr()
LeetCode 32 LongestValidParentheses
LeetCode 38 Count and Say
LeetCode 49 Group Anagrams
LeetCode 76 Minimum Window Substring(左右指针)
LeetCode 79 Word Search
LeetCode 87 Scramble String(递归)

3 数组

编号 题目
LeetCode 1 Two Sum
LeetCode 4 Median of Two Sorted Arrays
LeetCode 26 Remove Duplicates from Sorted Array
LeetCode 80 Remove Duplicates from Sorted Array II
LeetCode 27 Remove Element
LeetCode 36 Valid Sudoku(数独是否有效)
LeetCode 37 Sudoku Solver(数独求解 回溯法)
LeetCode 39 Combination Sum
LeetCode 40 Combination Sum II
LeetCode 41 First Missing Positive
LeetCode 48 Rotate Image
LeetCode 55 Jump Game
LeetCode 45 Jump Game II
LeetCode 53 Maximum Subarray
LeetCode 56 Merge Intervals
LeetCode 57 Insert Interval
LeetCode 73 Set Matrix Zeroes
LeetCode 84 Largest Rectangle in Histogram
LeetCode 85 Maximal Rectangle

4 链表

编号 题目
LeetCode 2 Add Two Numbers
LeetCode 21 Merge Two Sorted Lists
LeetCode 23 Merge k Sorted Lists
LeetCode 24 Swap Nodes in Pairs
LeetCode 25 Reverse Nodes in k-Group
LeetCode 82 Remove Duplicates from Sorted List II
LeetCode 83 Remove Duplicates from Sorted List
LeetCode 86 Partition List
LeetCode 142 (返回环第一个节点)Linked List Cycle II

5 数学

编号 题目
LeetCode 7 Reverse Integer
LeetCode 9 Palindrome Number
LeetCode 29 Divide Two Integers
LeetCode 31 Next Permutation
LeetCode 43 Multiply Strings
LeetCode 46 Permutations
LeetCode 50 Pow(x,n)
LeetCode 60 PermutationSequence
LeetCode 65 Valid Number
LeetCode 78 Subsets
LeetCode 90 Subsets II

6 DFS

编号 题目
LeetCode 17 Letter Combinations of a Phone Number

7 二分法

编号 题目
LeetCode 33 Search in Rotated Sorted Array
LeetCode 81 Search in Rotated Sorted Array II
LeetCode 34 Find First and Last Position of Element in Sorted Array
LeetCode 35 Search Insert Position
LeetCode 74 Search a 2D Matrix

8 滑动窗口

编号 题目
LeetCode 209 Minimum Size Subarray Sum

9 动态规划

编号 题目
LeetCode 44 Wildcard Matching
LeetCode 62 Unique Paths
LeetCode 63 Unique Paths II
LeetCode 64 Minimum Path Sum
LeetCode 70 Climbing Stairs
LeetCode 72 Edit Distance
LeetCode 209 Minimum Size Subarray Sum

1.BinaryTreeTraversal_PreMidAft.java 二叉树的先序(非递归)、中序、后序遍历,BFS

2.CircularQueue.java 循环队列

3.ListOperator.java 链表的插入、删除、查找等操作

4.Heap.java 建堆、调整

5.PriorityQueueMy.java 优先队列

6.BubbleSort.java 冒泡排序及其优化

7.CocktailSort.java 鸡尾酒排序

8.QuickSort.java 冒泡排序:单边循环、双边循环、非递归

9.HeapSort.java 堆排序

10.CountSort.java 计数排序

11.BucketSort.java 桶排序

12.IsCycle.java 判断链表是否有环

13.MinStack.java 实现带有出栈、入栈、取最小元素3个方法的栈,三种方法时间复杂度都是O(1)

14.GCD.java 最大公约数

15.IsPower2.java 判断是否是2的幂次

16.GetMaxSortedDistance.java 在一个未排序的数组中,找到排序后相邻元素最大差值

17.StackImpQueue.java 用栈实现队列

18.FullPermutationNext.java 全排列数字的下一个

19.RemoveKDigitsMin.java 一个整数,删去K个数字,使得剩下的数字最小

20.BigIntegerSum.java 大整数求和

21.GoldMine.java 金矿最大收益问题 DP

22.MissValue.java 寻找丢失的数字 数学类问题

23.LRUCache.java LRU缓存算法

24.AStarSeachAlgorithm.java A星寻址算法

25.DivideRedPackage.java 分红包

About

LeetCode algorithm problems

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages