![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python练习(LeetCode)
文章平均质量分 57
SDCS_Zyx
这个作者很懒,什么都没留下…
展开
-
Array-T41. First Missing Positive
Problem:Given an unsorted integer array, find the smallest missingpositive integer. Note: Your algorithm should run inO(n) time and uses constant extra space. Solve:(复杂度为O(nlogn)) Thou...原创 2018-04-23 16:28:17 · 370 阅读 · 0 评论 -
(LeetCode) T94. Binary Tree Inorder Traversal
Problem:Given a binary tree, return the inorder traversal of its nodes' values.Solve:Thought:I solve it by using recursive solution.It's so easy to do it with its definition.So there is a tip like thi...原创 2018-05-02 17:55:21 · 201 阅读 · 0 评论 -
(LeetCode) T213. House Robber II
Problem:You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed. All houses at this place are arranged in a circle. That means the first h...原创 2018-05-02 22:49:34 · 218 阅读 · 0 评论 -
(LeetCode) T8.String to Integer (atoi)
Problem:Implement atoi which converts a string to an integer.The function first discards as many whitespace characters as necessary until the first non-whitespace character is found. Then, starting fr...原创 2018-04-27 20:40:29 · 196 阅读 · 0 评论 -
(LeetCode) T14. Longest Common Prefix
Problem : Write a function to find the longest common prefix string amongst an array of strings.If there is no common prefix, return an empty string "".Solve :Thought :这道题属于easy的题,想要解题自然是不难,这道题有很多种算法,...原创 2018-05-18 20:15:48 · 203 阅读 · 0 评论 -
(LeetCode) T2. Add Two Numbers
Problem:You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and ...原创 2018-05-16 19:41:32 · 197 阅读 · 0 评论