Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
1-9
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

leetcode

使用python刷leetcode题目,包含思路的简单描述和代码,不定时更新

note: 从42开始,改用C++语言

1. longestPalindromeSubstring 查找字符串中最长回文
2. findMidianSortedArrays 查找两个已排序数组的中位数
3. longestSubstringWithoutRepeating 查找字符串中的最长不重复子串的长度
4. stringTointeger(atio) 手动实现atio函数,转换str到int
5. palindrome Number 判断一个整数是否为回文数,不使用额外变量
6. mergeTwoBinaryTree 合并两棵二叉树
7. regularExpressionMatching 实现.*正则表达式匹配函数
8. addTwoLinkNumbers 将两个链表整数相加
9. twoSum 从数组中寻找和的相加数
10. reverseInteger 反转整数
11. Container With Most Water 容器最大盛水量问题
12. Integer to Roman 阿拉伯数字转换成罗马数字
13. Roman to Integer 罗马数字转换成阿拉伯数字
14. Longest Common Prefix 字符串数组最长公共前缀
15. 3Sum 三元组相加获得target
16. 3SumClosest 三元组相加获得结果最接近target
17. Letter Combinations of a Phone Number 九宫格数字键盘字符组合
18. 4Sum 四元组相加获得target
19. Remove Nth Node From End of List 移除链表倒数第n个元素
20. Valid Parentheses 验证大小中括号是否成对闭合匹配
21. Merge Two Sorted Lists 合并两个已排序的链表
22. Generate Parentheses 构造n个成对括号
23. Merge k Sorted Lists 合并n个已排序的链表
24. Swap Nodes in Pairs 成对交换链表节点
25. Reverse Nodes in k-Group k组倒置链表节点
26. Remove Duplicates from Sorted Array 移除数组中重复元素
27. Divide Two Integers 两数相除——不允许使用高级运算
28. Substring with Concatenation of All Words 寻找所有词串联的子串的位置
29. Next Permutation 数字数组的下一个最小排列
30. Longest Valid Parentheses 求最长的括弧匹配子串的长度
31. Search in Rotated Sorted Array 反转内数组搜寻元素
32. Search for a Range 查找元素在数组中的位置范围
33. Search Insert Position 查找元素插入的位置
34. Valid Sudoku 验证数独题目是否合规
35. Sudoku Solver 数独解题器
36. Count and Say 报数
37. Combination Sum 组合总数
38. Combination Sum II 组合总数 II
39. First Missing Positive 缺失的第一个正数
40. Trapping Rain Water 接雨水
41. Multiply Strings 字符串相乘
42. Jump Game II 跳跃游戏II
43. Jump Game I 跳跃游戏I
44. Maximum Subarray 最大子序列和
45. Rotate Image 旋转图像
46. Spiral Matrix 螺旋矩阵
47. Merge Intervals 合并区间
48. Insert Intervals 插入区间
49. Insert Intervals 螺旋矩阵II
50. Unique Paths 不同路径
51. Unique Paths II 不同路径II
52. Minimum Path Sum 最短路径和
53. Plus One 加一
54. Set Matrix Zeroes 矩阵置零
55. Search a 2D Matrix 搜索二维矩阵
56. Sort Colors 颜色排序
57. Subsets 子集
58. Word Search 单词搜索
59. Remove Duplicates from Sorted Array II 删除排序数组中的重复项 II

About

使用python刷leetcode题目

Topics

Resources

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.