题目: Given a collection of intervals, merge all overlapping intervals. For example, Given [1,3],[2,6],[8,1…
分类:LeetCode题目解答
238. Product of Array Except Self
Given an array nums of n integers where n > 1, return an array output such that output[i] is equal to the p…
7. Reverse Integer
Given a 32-bit signed integer, reverse digits of an integer. Example 1:Input: 123Output: 321 Example 2:Input: …
[LeetCode] Search in Rotated Sorted Array 在旋转有序数组中搜索
Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7&nb…
[LeetCode] Perfect Squares 完全平方数
Given a positive integer n, find the least number of perfect square numbers (for example, 1, …
[LeetCode] Contiguous Array 邻近数组
Given a binary array, find the maximum length of a contiguous subarray with equal number of 0 and 1. Ex…
力扣(LeetCode)417
题目地址:https://leetcode-cn.com/probl…题目描述:给定一个 m x n 的非负整数矩阵来表示一片大陆上各个单元格的高度。“太平洋”处于大陆的左边界和上边界,而“大西洋”处于大陆的…
[LeetCode] Ternary Expression Parser 三元表达式解析器
Given a string representing arbitrarily nested ternary expressions, calculate the result of the express…
207. Course Schedule
There are a total of n courses you have to take, labeled from 0 to n-1. Some courses may have prerequisites, f…
[Leetcode] Read N Characters Given Read4 用Read4 API读取N个字符
Read N Characters Given Read4 I The API: int read4(char *buf) reads 4 characters at a time from a file. The re…
[Leetcode] Same Tree Symmetric Tree 相同树 对称树
Same Tree Given two binary trees, write a function to check if they are equal or not. Two binary trees are con…
90. Subsets II
90. Subsets II 题目 Given a collection of integers that might contain duplicates, nums, return all possible subs…