Shortest Word Distance Given a list of words and two words word1 and word2, return the shortest dis ...
打家劫舍 House Robber 是LeetCode上比较典型的一个题目,涉及三道题,主要解题思想是动态规划,将三道题依次记录如下: 一 打家劫舍 题目等级: House Robber Easy 题目描述: You are a professional robber planning to rob houses along a street. Each house has a certain ...
2019-07-15 12:13 0 1865 推荐指数:
Shortest Word Distance Given a list of words and two words word1 and word2, return the shortest dis ...
(一)只出现一次的数字(其他两次) 题目(Easy):136. 只出现一次的数字 题目描述: 给定一个非空整数数组,除了某个元素只出现一次以外,其余每个元素均出现两次。找出那个只出现了一次的元素 ...
Best Time to Buy and Sell Stock I Say you have an array for which the ith element is the price of a given stock on day i. If you were only ...
LeetCode:Best Time to Buy and Sell Stock Say you have an array for which the ith element is the price of a given stock on day i. If you were only ...
The thief has found himself a new place for his thievery again. There is only one entrance to thi ...
You are a professional robber planning to rob houses along a street. Each house has a certain amo ...
求集合的所有子集问题 LeetCode:Subsets Given a set of distinct integers, S, return all possible subsets. Note: Elements in a subset must ...
题目描述 MyCalendar主要实现一个功能就是插入指定起始结束时间的事件,对于重合的次数有要求。 MyCalendar I要求任意两个事件不能有重叠的部分,如果插入这个事件会导致重合,则插入失败,不进行插入;否则插入并返回true。 My Calendar II要求任意三个事件 ...