leecode 题集 2.给出两个 非空 的链表用来表示两个非负的整数。其中,它们各自的位数是按照逆序的方式存储的,并且它们的每个节点只能存储 一位 数字。如果,我们将这两个数相加起来,则会返回一个新的链表来表示它们的和。您可以假设除了数字 0 之外,这两个数都不会以 0 开头。示例:输入:(2 - ...
分类:
其他好文 时间:
2019-10-21 11:33:35
阅读次数:
79
Given a collection of integers that might contain duplicates, nums, return all possible subsets (the power set). Note: The solution set must not conta ...
分类:
其他好文 时间:
2019-10-21 09:28:45
阅读次数:
95
Given a set of candidate numbers (candidates) (without duplicates) and a target number (target), find all unique combinations in candidates where the ...
分类:
其他好文 时间:
2019-10-19 20:30:00
阅读次数:
89
``` 给定一个包含了一些 0 和 1的非空二维数组 grid , 一个 岛屿 是由四个方向 (水平或垂直) 的 1 (代表土地) 构成的组合。你可以假设二维矩阵的四个边缘都被水包围着。 找到给定的二维数组中最大的岛屿面积。(如果没有岛屿,则返回面积为0。) 示例 1: [[0,0,1,0,0,0,... ...
分类:
其他好文 时间:
2019-10-14 12:10:26
阅读次数:
74
题目描述: 中文: 给定一个排序链表,删除所有重复的元素,使得每个元素只出现一次。 示例 1: 输入: 1->1->2输出: 1->2 示例 2: 输入: 1->1->2->3->3输出: 1->2->3 英文: Given a sorted linked list, delete all dupl ...
分类:
编程语言 时间:
2019-10-08 21:55:25
阅读次数:
86
Difficulty:easy More:【目录】LeetCode Java实现 Description https://leetcode.com/problems/remove-duplicates-from-sorted-array/ Given a sorted array nums, rem ...
分类:
其他好文 时间:
2019-10-08 16:13:29
阅读次数:
97
此题的难点是: 针对可能存在的重复数值,选出唯一的数值(使用 ); 选取第二个数值,则需要使用 确定数值; 查询的数值可能为不存在,此时就需要返回 (使用IFNULL). 答题如下所示: ...
分类:
其他好文 时间:
2019-10-07 23:45:02
阅读次数:
176
解题思路较为简单,使用 即可解决. 答案如下图所示: ...
分类:
其他好文 时间:
2019-10-07 23:34:24
阅读次数:
121
Given a sorted array nums, remove the duplicates in-place such that duplicates appeared at most twice and return the new length. Do not allocate extra ...
分类:
编程语言 时间:
2019-10-05 00:34:49
阅读次数:
88
题目如下: Given a string s, a k duplicate removal consists of choosing k adjacent and equal letters from s and removing them causing the left and the righ ...
分类:
其他好文 时间:
2019-10-02 10:55:30
阅读次数:
87