56: Merge Intervals Given a collection of intervals, merge all overlapping intervals. Example 1: Example 2: 思路: 将区间的左端点按从小到大进行排序,然后观察相邻2个区间是否有公共部分,如果有 ...
分类:
其他好文 时间:
2020-01-30 21:10:18
阅读次数:
62
1302. Deepest Leaves Sum Given a binary tree, return the sum of values of its deepest leaves. Example 1: Input: root = [1,2,3,4,5,null,6,7,null,null,n ...
分类:
其他好文 时间:
2020-01-30 12:59:39
阅读次数:
85
Given a non-empty binary search tree and a target value, find the value in the BST that is closest to the target. Note: Given target value is a floati ...
分类:
其他好文 时间:
2020-01-30 12:32:09
阅读次数:
67
Given a palindromic string palindrome, replace exactly one character by any lowercase English letter so that the string becomes the lexicographically ...
分类:
其他好文 时间:
2020-01-30 09:47:14
阅读次数:
94
Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note: The number of elements initialized in nums1 and num ...
分类:
其他好文 时间:
2020-01-30 09:33:10
阅读次数:
72
Given two sets of integers, the similarity of the sets is defined to be /, where N?c?? is the number of distinct common numbers shared by the two sets ...
分类:
其他好文 时间:
2020-01-29 21:54:49
阅读次数:
84
Zhejiang University has 40000 students and provides 2500 courses. Now given the student name lists of all the courses, you are supposed to output the ...
分类:
其他好文 时间:
2020-01-29 20:07:30
阅读次数:
89
题目内容 Given a Binary Search Tree and a target number, return true if there exist two elements in the BST such that their sum is equal to the given targ ...
分类:
其他好文 时间:
2020-01-29 20:00:01
阅读次数:
62
Zhejiang University has 40,000 students and provides 2,500 courses. Now given the registered course list of each student, you are supposed to output t ...
分类:
其他好文 时间:
2020-01-29 19:46:43
阅读次数:
81
题目内容 Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of th ...
分类:
其他好文 时间:
2020-01-29 18:24:31
阅读次数:
58