随笔分类 -  LeetCode

上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 61 下一页
摘要:Given a list of sorted characters letters containing only lowercase letters, and given a target letter target, find the smallest element in the list t 阅读全文
posted @ 2018-01-14 23:58 Grandyang 阅读(3994) 评论(0) 推荐(0) 编辑
摘要:There are N network nodes, labelled 1 to N. Given times, a list of travel times as directededges times[i] = (u, v, w), where u is the source node, v i 阅读全文
posted @ 2018-01-12 23:52 Grandyang 阅读(11361) 评论(8) 推荐(0) 编辑
摘要:Start from integer 1, remove any integer that contains 9 such as 9, 19, 29... So now, you will have a new integer sequence: 1, 2, 3, 4, 5, 6, 7, 8, 10 阅读全文
posted @ 2018-01-10 23:13 Grandyang 阅读(3176) 评论(14) 推荐(0) 编辑
摘要:Given a binary tree where every node has a unique value, and a target key k, find the value of the nearest leaf node to target k in the tree. Here, ne 阅读全文
posted @ 2018-01-08 23:46 Grandyang 阅读(6179) 评论(3) 推荐(0) 编辑
摘要:In a N x N grid representing a field of cherries, each cell is one of three possible integers. 0 means the cell is empty, so you can pass through; 1 m 阅读全文
posted @ 2018-01-06 23:58 Grandyang 阅读(10406) 评论(1) 推荐(0) 编辑
摘要:Given an array A (index starts at 1) consisting of N integers: A1, A2, ..., AN and an integer B. The integer Bdenotes that from any place (suppose the 阅读全文
posted @ 2018-01-03 14:03 Grandyang 阅读(5459) 评论(1) 推荐(0) 编辑
摘要:Given an array nums of integers, you can perform operations on the array. In each operation, you pick any nums[i] and delete it to earn nums[i] points 阅读全文
posted @ 2018-01-02 14:00 Grandyang 阅读(6926) 评论(0) 推荐(0) 编辑
摘要:Given a list of daily temperatures, produce a list that, for each day in the input, tells you how many days you would have to wait until a warmer temp 阅读全文
posted @ 2017-12-24 10:37 Grandyang 阅读(10887) 评论(5) 推荐(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 @ 2017-12-19 23:43 Grandyang 阅读(4906) 评论(2) 推荐(0) 编辑
摘要:Given two sentences words1, words2 (each represented as an array of strings), and a list of similar word pairs pairs, determine if two sentences are s 阅读全文
posted @ 2017-12-17 23:49 Grandyang 阅读(6732) 评论(0) 推荐(0) 编辑
摘要:You are given a string expression representing a Lisp-like expression to return the integer value of. The syntax for these expressions is given as fol 阅读全文
posted @ 2017-12-15 23:48 Grandyang 阅读(4818) 评论(1) 推荐(0) 编辑
摘要:We are given an array asteroids of integers representing asteroids in a row. For each asteroid, the absolute value represents its size, and the sign r 阅读全文
posted @ 2017-12-13 23:41 Grandyang 阅读(5422) 评论(0) 推荐(1) 编辑
摘要:Given an array consisting of n integers, find the contiguous subarray whose length is greater than or equal to k that has the maximum average value. A 阅读全文
posted @ 2017-12-11 06:41 Grandyang 阅读(12090) 评论(0) 推荐(1) 编辑
摘要:Given two sentences words1, words2 (each represented as an array of strings), and a list of similar word pairs pairs, determine if two sentences are s 阅读全文
posted @ 2017-12-10 09:42 Grandyang 阅读(6520) 评论(0) 推荐(0) 编辑
摘要:Implement a MyCalendarThree class to store your events. A new event can always be added. Your class will have one method, book(int start, int end). Fo 阅读全文
posted @ 2017-12-08 13:53 Grandyang 阅读(4996) 评论(1) 推荐(1) 编辑
摘要:An image is represented by a 2-D array of integers, each integer representing the pixel value of the image (from 0 to 65535). Given a coordinate (sr, 阅读全文
posted @ 2017-12-05 23:23 Grandyang 阅读(10955) 评论(2) 推荐(0) 编辑
摘要:Implement a MyCalendarTwo class to store your events. A new event can be added if adding the event will not cause a triple booking. Your class will ha 阅读全文
posted @ 2017-12-03 23:50 Grandyang 阅读(8227) 评论(2) 推荐(1) 编辑
摘要: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 @ 2017-12-01 14:13 Grandyang 阅读(7439) 评论(9) 推荐(0) 编辑
摘要:Implement a MyCalendar class to store your events. A new event can be added if adding the event will not cause a double booking. Your class will have 阅读全文
posted @ 2017-11-29 14:14 Grandyang 阅读(7285) 评论(0) 推荐(1) 编辑
摘要:A self-dividing number is a number that is divisible by every digit it contains. For example, 128 is a self-dividing number because 128 % 1 == 0, 128 阅读全文
posted @ 2017-11-27 23:55 Grandyang 阅读(4418) 评论(0) 推荐(0) 编辑

上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 61 下一页
Fork me on GitHub