随笔分类 -  Leetcode

上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 23 下一页
摘要:An integer interval [a, b] (for integers a < b) is a set of all consecutive integers from a to b, including a and b. Find the minimum size of a set S 阅读全文
posted @ 2019-01-09 22:36 Veritas_des_Liberty 阅读(351) 评论(0) 推荐(0) 编辑
摘要:Given a non-negative integer N, find the largest number that is less than or equal to N with monotone increasing digits. (Recall that an integer has m 阅读全文
posted @ 2019-01-09 21:05 Veritas_des_Liberty 阅读(229) 评论(0) 推荐(0) 编辑
摘要:970. Powerful Integers Given two non-negative integers x and y, an integer is powerful if it is equal to x^i + y^j for some integers i >= 0 and j >= 0 阅读全文
posted @ 2019-01-06 12:43 Veritas_des_Liberty 阅读(215) 评论(0) 推荐(0) 编辑
摘要:121. 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 permitte 阅读全文
posted @ 2019-01-05 22:35 Veritas_des_Liberty 阅读(256) 评论(0) 推荐(0) 编辑
摘要:In the world of Dota2, there are two parties: the Radiant and the Dire. The Dota2 senate consists of senators coming from two parties. Now the senate 阅读全文
posted @ 2019-01-05 21:50 Veritas_des_Liberty 阅读(328) 评论(0) 推荐(0) 编辑
摘要:There are n different online courses numbered from 1 to n. Each course has some duration(course length) t and closed on dth day. A course should be ta 阅读全文
posted @ 2019-01-05 17:52 Veritas_des_Liberty 阅读(315) 评论(0) 推荐(0) 编辑
摘要:Given a char array representing tasks CPU need to do. It contains capital letters A to Z where different letters represent different tasks. Tasks coul 阅读全文
posted @ 2019-01-03 10:06 Veritas_des_Liberty 阅读(246) 评论(0) 推荐(0) 编辑
摘要:There are a number of spherical balloons spread in two-dimensional space. For each balloon, provided input is the start and end coordinates of the hor 阅读全文
posted @ 2019-01-02 22:10 Veritas_des_Liberty 阅读(230) 评论(0) 推荐(0) 编辑
摘要:Given a collection of intervals, find the minimum number of intervals you need to remove to make the rest of the intervals non-overlapping. Note: Exam 阅读全文
posted @ 2019-01-02 12:01 Veritas_des_Liberty 阅读(205) 评论(0) 推荐(0) 编辑
摘要:Given a non-negative integer num represented as a string, remove k digits from the number so that the new number is the smallest possible. Note: The l 阅读全文
posted @ 2019-01-02 11:27 Veritas_des_Liberty 阅读(182) 评论(0) 推荐(0) 编辑
摘要:Suppose you have a random list of people standing in a queue. Each person is described by a pair of integers (h, k), where h is the height of the pers 阅读全文
posted @ 2019-01-01 16:56 Veritas_des_Liberty 阅读(171) 评论(0) 推荐(0) 编辑
摘要:A sequence of numbers is called a wiggle sequence if the differences between successive numbers strictly alternate between positive and negative. The 阅读全文
posted @ 2019-01-01 15:51 Veritas_des_Liberty 阅读(221) 评论(0) 推荐(0) 编辑
摘要:Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may comple 阅读全文
posted @ 2019-01-01 11:54 Veritas_des_Liberty 阅读(159) 评论(0) 推荐(0) 编辑
摘要:Given a sorted positive integer array nums and an integer n, add/patch elements to the array such that any number in range [1, n] inclusive can be for 阅读全文
posted @ 2019-01-01 11:13 Veritas_des_Liberty 阅读(157) 评论(0) 推荐(0) 编辑
摘要:Given two arrays of length m and n with digits 0-9 representing two numbers. Create the maximum number of length k <= m + n from digits of the two. Th 阅读全文
posted @ 2018-12-31 21:25 Veritas_des_Liberty 阅读(234) 评论(0) 推荐(0) 编辑
摘要:Given a string which contains only lowercase letters, remove duplicate letters so that every letter appear once and only once. You must make sure your 阅读全文
posted @ 2018-12-31 20:22 Veritas_des_Liberty 阅读(200) 评论(0) 推荐(0) 编辑
摘要:There are N children standing in a line. Each child is assigned a rating value. You are giving candies to these children subjected to the following re 阅读全文
posted @ 2018-12-31 18:23 Veritas_des_Liberty 阅读(228) 评论(0) 推荐(0) 编辑
摘要:There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. You have a car with an unlimited gas tank and it cost 阅读全文
posted @ 2018-12-31 16:46 Veritas_des_Liberty 阅读(226) 评论(0) 推荐(0) 编辑
摘要:Starting with an undirected graph (the "original graph") with nodes from 0 to N-1, subdivisions are made to some of the edges. The graph is given as f 阅读全文
posted @ 2018-12-30 22:21 Veritas_des_Liberty 阅读(327) 评论(0) 推荐(0) 编辑
摘要:A car travels from a starting position to a destination which is target miles east of the starting position. Along the way, there are gas stations. Ea 阅读全文
posted @ 2018-12-30 21:13 Veritas_des_Liberty 阅读(326) 评论(0) 推荐(0) 编辑

上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 23 下一页