leetcode
guyuan002
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Leetcode: 反转32-bit整数
真的没意思的一道题,刚开始还想用stack做,后来只能感叹python的强大,直接反转字符串,核心代码就是[::-1] class Solution: def reverse(self, x: int) -> int: if x > -10 and x < 10: return x sign = 1 ...原创 2019-05-21 11:05:11 · 489 阅读 · 0 评论 -
Leetcode 用链表相加两个数
Leetcode 用链表相加两个数 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 nu...原创 2019-05-17 00:38:08 · 306 阅读 · 0 评论 -
Leetcode 找最长不重复子字符串
Given a string, find the length of the longest substring without repeating characters. Example 1: Input: “abcabcbb” Output: 3 Explanation: The answer is “abc”, with the length of 3. Example 2: Input: ...原创 2019-05-17 00:59:00 · 323 阅读 · 0 评论 -
[Leetcode]Container with most water 最大容水量
问题: Given n non-negative integers a1, a2, …, an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find t...原创 2019-08-01 10:54:03 · 155 阅读 · 0 评论
分享