Skip to content

Codes and Answers of Leetcode Problems in Python

License

Notifications You must be signed in to change notification settings

XuanYang-cn/leetcode

Repository files navigation

leetcode_answers_python

Codes and Answers of Leetcode Problems in Python

#MethodCode LangDifficultyRecommend
1Two Sum 两数之和python/cppEasy0
3Longest Substring Without Repeating Characters 无重复字符的最长子串pythonMedium
7Reverse Integer 整数反转pythonEasy
8String to integer 字符串转换整数(atoi)pythonMedium
13Roman to Integer 罗马数字转整数pythonEasy3
14Longest common prefix 最长公共前缀pythonEasy
19Remove Nth node from end of linkedlist 删除链表的倒数第n个节点pythonMedium5
21Merge two sorted lists 合并两个有序链表pythonEasy
23Merge K sorted array 合并K个有序链表pythonHard5
28Implement strstr 实现strStr()pythonEasy
38Count and Say 报数pythonEasy5
53Maximum Subarray 最大子序和(DP、DC)solution & pythonEasy5
88Merge Sorted array 合并两个有序数组pythonEasy2
98Validate Binary Search Tree 验证有效的二叉搜索树pythonMedium5
108Convert sorted array to binary search tree 将有序数组转化为二叉搜索树pythonEasy1
141Linked list cycle 环形链表pythonEasy1
206Reverse linkedlist 反转链表pythonEasy1
234Palindrome linked list 回文链表pythonEasy1
237Delete a node in a Linkedlist 删除链表中的结点(题目本身很好,题意描述太不清晰)pythonEasy0
278First Bad Version 第一个错误的版本(二分搜索的变种)pythonEasy3
326Power of Three 3的幂pythonEasy3
384Shuffle an Array 打乱数组pythonMedium3

Hamming Distance series 求汉明距离系列

#MehodCodeDifficulty
191Number of 1 bits 位1的个数pythonEasy
461Hamming Distance 汉明距离pythonEasy
477Total Hamming Distance 汉明距离总和pythonMedium

Please Checkout TODO to see what's the plan next

It is welcomed to open issues if you wanna help : )

About

Codes and Answers of Leetcode Problems in Python

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

close