
LeetCode
文章平均质量分 77
煎鸡蛋汤
今天是我的生日,就像往年一样,老妈给我做了一碗煎鸡蛋汤
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
190. Reverse Bits
190. Reverse Bits 是一道难度为Easy的题目,本文借这题讲述不同进制的转换,在此之前,先讲述题目 解题 解题思路 十进制转二进制并倒序,参考:十进制转二进制,将insert改成append 补齐32位 二进制转十进制,参考:二进制转十进制 python3实现 class Solution: def reverseBits(self, n: int) -> int...原创 2020-04-06 16:18:28 · 691 阅读 · 0 评论 -
26. Remove Duplicates from Sorted Array
26. Remove Duplicates from Sorted Array 从一个排序的数组中删除重复的元素,要求不能使用额外的内存 解题思路 input: nums = 1 1 2 init: length=3, slow=0, fast=1 1. fast < length, nums[slow] == nums[fast], slow + 0 -> 0, fast + 1 ...原创 2020-04-01 23:35:13 · 567 阅读 · 0 评论 -
1. Two Sum
给定一个整数数组和一个目标值,返回两个数的索引,这两个数之和等于目标值原创 2016-04-05 08:33:35 · 604 阅读 · 0 评论 -
2.Add Two Numbers
给定两个链表表示两个非负数,每个节点只有单个的数字,节点间按反序存储,例如:(2 -> 4 -> 3) + (5 -> 6 -> 4)表示342+465,求两个链表之和,返回和的链表形式原创 2016-04-10 15:27:17 · 509 阅读 · 0 评论 -
3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters. Examples: Given “abcabcbb”, the answer is “abc”, which the length is 3. Given “bbbbb”, the answer is “b”,原创 2016-04-28 09:24:19 · 671 阅读 · 1 评论