随笔分类 -  Google

上一页 1 2 3 4 5 6 ··· 10 下一页
摘要: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: You 阅读全文
posted @ 2019-07-23 12:45 北叶青藤 阅读(316) 评论(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-07-23 12:44 北叶青藤 阅读(310) 评论(0) 推荐(0)
摘要:Given a rows x cols screen and a sentence represented by a list of words, find how many times the given sentence can be fitted on the screen. Note: A 阅读全文
posted @ 2019-07-18 12:58 北叶青藤 阅读(220) 评论(0) 推荐(0)
摘要:Given a string S, find the number of different non-empty palindromic subsequences in S, and return that number modulo 10^9 + 7. A subsequence of a str 阅读全文
posted @ 2019-07-18 12:01 北叶青藤 阅读(284) 评论(0) 推荐(0)
摘要:Design a search autocomplete system for a search engine. Users may input a sentence (at least one word and end with a special character '#'). For each 阅读全文
posted @ 2019-07-15 05:34 北叶青藤 阅读(520) 评论(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 could 阅读全文
posted @ 2019-06-26 14:21 北叶青藤 阅读(370) 评论(0) 推荐(0)
摘要:Given a BST, remove an extra edge to make it BST. 7 / \ 5 9 / \ / 3 8 阅读全文
posted @ 2019-06-22 11:25 北叶青藤 阅读(324) 评论(0) 推荐(0)
摘要:In this problem, a tree is an undirected graph that is connected and has no cycles. The given input is a graph that started as a tree with N nodes (wi 阅读全文
posted @ 2019-06-22 10:46 北叶青藤 阅读(216) 评论(0) 推荐(0)
摘要:A group of friends went on holiday and sometimes lent each other money. For example, Alice paid for Bill's lunch for $10. Then later Chris gave Alice 阅读全文
posted @ 2019-06-16 01:31 北叶青藤 阅读(340) 评论(0) 推荐(0)
摘要:A peak element is an element that is greater than its neighbors. Given an input array where num[i] ≠ num[i+1], find a peak element and return its inde 阅读全文
posted @ 2019-06-09 11:45 北叶青藤 阅读(134) 评论(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-06-09 11:17 北叶青藤 阅读(148) 评论(0) 推荐(0)
摘要:Initially, there is a Robot at position (0, 0). Given a sequence of its moves, judge if this robot makes a circle, which means it moves back to the or 阅读全文
posted @ 2019-06-09 10:37 北叶青藤 阅读(129) 评论(0) 推荐(0)
摘要:Given a time represented in the format "HH:MM", form the next closest time by reusing the current digits. There is no limit on how many times a digit 阅读全文
posted @ 2019-05-28 07:27 北叶青藤 阅读(276) 评论(0) 推荐(0)
摘要:Given an array of integers nums and a positive integer k, find whether it's possible to divide this array into k non-empty subsets whose sums are all 阅读全文
posted @ 2019-05-06 00:31 北叶青藤 阅读(414) 评论(0) 推荐(0)
摘要:Given a non-empty array containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both 阅读全文
posted @ 2019-05-06 00:11 北叶青藤 阅读(300) 评论(0) 推荐(0)
摘要:Given an array with n integers, your task is to check if it could become non-decreasing by modifying at most 1 element. We define an array is non-decr 阅读全文
posted @ 2019-04-29 13:19 北叶青藤 阅读(190) 评论(0) 推荐(0)
摘要:Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. Note: You may assume k is always valid, 1 ≤ k ≤ BST's 阅读全文
posted @ 2019-04-28 12:46 北叶青藤 阅读(214) 评论(0) 推荐(0)
摘要:Given a non-negative integer numRows, generate the first numRows of Pascal's triangle. In Pascal's triangle, each number is the sum of the two numbers 阅读全文
posted @ 2019-04-28 11:36 北叶青藤 阅读(123) 评论(0) 推荐(0)
摘要:Given a string s and a non-empty string p, find all the start indices of p's anagrams in s. Strings consists of lowercase English letters only and the 阅读全文
posted @ 2019-04-28 11:21 北叶青藤 阅读(147) 评论(0) 推荐(0)
摘要:Given an encoded string, return it's decoded string.The encoding rule is: k[encoded_string], where the encoded_string inside the square brackets is be 阅读全文
posted @ 2019-04-22 01:48 北叶青藤 阅读(394) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 ··· 10 下一页