Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear …
分类:LeetCode题目解答
[LeetCode] Detect Capital 检测大写格式
Given a word, you need to judge whether the usage of capitals in it is right or not. We define the usag…
[LeetCode] Monotone Increasing Digits 单调递增数字
Given a non-negative integer N, find the largest number that is less than or equal to N …
[Leetcode] String to Integer (atoi) 字符串转整数
String to Integer (atoi) Implement atoi to convert a string to an integer. Hint: Carefully consider all possib…
275. H-Index II
Given an array of citations sorted in ascending order (each citation is a non-negative integer) of a researche…
[Leetcode] Lowest Common Ancestor of a Binary Tree 最小公共祖先
Lowest Common Ancestor of a Binary Search Tree 最新更新请见:https://yanjia.me/zh/2019/02/… Given a binary sear…
【leetcode】39. Combination Sum 求整数数组里的等于指定值的所有子集
1. 题目 Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where th…
126. Word Ladder II(hard)
126. Word Ladder II 题目 Given two words (beginWord and endWord), and a dictionary's word list, find all shortes…
[LeetCode] Single Element in a Sorted Array 有序数组中的单独元素
Given a sorted array consisting of only integers where every element appears twice except for one eleme…
[LeetCode] My Calendar III 我的日历之三
Implement a MyCalendarThree class to store your events. A new event can always be a…
[LeetCode] Soup Servings 供应汤
There are two types of soup: type A and type B. Initially we have N ml of each type of soup. …
[Leetcode] Paint House 房子涂色
Paint House There are a row of n houses, each house can be painted with one of the three colors: red, blue or …