上一页 1 ··· 35 36 37 38 39 40 41 42 43 ··· 64 下一页
摘要: Koko loves to eat bananas. There are N piles of bananas, the i-th pile has piles[i] bananas. The guards have gone and will come back in H hours. Koko 阅读全文
posted @ 2020-09-09 10:38 CNoodle 阅读(361) 评论(0) 推荐(0)
摘要: You are given the root of a binary tree where each node has a value 0 or 1. Each root-to-leaf path represents a binary number starting with the most s 阅读全文
posted @ 2020-09-09 05:58 CNoodle 阅读(271) 评论(0) 推荐(0)
摘要: Given an array arr of positive integers sorted in a strictly increasing order, and an integer k. Find the kth positive integer that is missing from th 阅读全文
posted @ 2020-09-08 15:30 CNoodle 阅读(1595) 评论(0) 推荐(0)
摘要: On a campus represented as a 2D grid, there are N workers and M bikes, with N <= M. Each worker and bike is a 2D coordinate on this grid. Our goal is 阅读全文
posted @ 2020-09-08 11:58 CNoodle 阅读(236) 评论(0) 推荐(0)
摘要: Given a pattern and a string s, find if s follows the same pattern. Here follow means a full match, such that there is a bijection between a letter in 阅读全文
posted @ 2020-09-08 00:53 CNoodle 阅读(202) 评论(0) 推荐(0)
摘要: There is a car with capacity empty seats. The vehicle only drives east (i.e., it cannot turn around and drive west). You are given the integer capacit 阅读全文
posted @ 2020-09-08 00:10 CNoodle 阅读(577) 评论(0) 推荐(0)
摘要: Given the coordinates of two rectilinear rectangles in a 2D plane, return the total area covered by the two rectangles. The first rectangle is defined 阅读全文
posted @ 2020-09-07 06:24 CNoodle 阅读(227) 评论(0) 推荐(0)
摘要: You are given two images, img1 and img2, represented as binary, square matrices of size n x n. A binary matrix has only 0s and 1s as values. We transl 阅读全文
posted @ 2020-09-07 05:05 CNoodle 阅读(230) 评论(0) 推荐(0)
摘要: An axis-aligned rectangle is represented as a list [x1, y1, x2, y2], where (x1, y1) is the coordinate of its bottom-left corner, and (x2, y2) is the c 阅读全文
posted @ 2020-09-07 03:19 CNoodle 阅读(238) 评论(0) 推荐(0)
摘要: Given an n-ary tree, return the level order traversal of its nodes' values. Nary-Tree input serialization is represented in their level order traversa 阅读全文
posted @ 2020-09-07 02:05 CNoodle 阅读(158) 评论(0) 推荐(0)
摘要: Given two binary search trees root1 and root2. Return a list containing all the integers from both trees sorted in ascending order. Example 1: Input: 阅读全文
posted @ 2020-09-06 14:04 CNoodle 阅读(287) 评论(0) 推荐(0)
摘要: Given an integer array nums of size n, return the minimum number of moves required to make all array elements equal. In one move, you can increment or 阅读全文
posted @ 2020-09-04 05:38 CNoodle 阅读(341) 评论(0) 推荐(0)
摘要: Given an integer array nums of size n, return the minimum number of moves required to make all array elements equal. In one move, you can increment n 阅读全文
posted @ 2020-09-04 04:36 CNoodle 阅读(258) 评论(0) 推荐(0)
摘要: Given a file and assume that you can only read the file using a given method read4, implement a method read to read n characters. Your method read may 阅读全文
posted @ 2020-09-02 07:59 CNoodle 阅读(464) 评论(0) 推荐(0)
摘要: Given a file and assume that you can only read the file using a given method read4, implement a method to read n characters. Method read4: The API rea 阅读全文
posted @ 2020-09-02 02:47 CNoodle 阅读(425) 评论(0) 推荐(0)
摘要: Given an array of integers nums and a positive integer k, find whether it's possible to divide this array into sets of k consecutive numbersReturn Tru 阅读全文
posted @ 2020-09-01 05:13 CNoodle 阅读(361) 评论(0) 推荐(0)
摘要: You are given the root of a binary search tree (BST), where exactly two nodes of the tree were swapped by mistake. Recover the tree without changing i 阅读全文
posted @ 2020-09-01 04:38 CNoodle 阅读(458) 评论(0) 推荐(0)
摘要: Alice has some number of cards and she wants to rearrange the cards into groups so that each group is of size groupSize, and consists of groupSize con 阅读全文
posted @ 2020-08-31 14:44 CNoodle 阅读(254) 评论(0) 推荐(0)
摘要: You are given an array of intervals, where intervals[i] = [starti, endi] and each starti is unique. The right interval for an interval i is an interva 阅读全文
posted @ 2020-08-28 06:48 CNoodle 阅读(261) 评论(0) 推荐(0)
摘要: There is a robot starting at position (0, 0), the origin, on a 2D plane. Given a sequence of its moves, judge if this robot ends up at (0, 0) after it 阅读全文
posted @ 2020-08-28 01:25 CNoodle 阅读(207) 评论(0) 推荐(0)
上一页 1 ··· 35 36 37 38 39 40 41 42 43 ··· 64 下一页