随笔分类 -  LeetCode

上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 61 下一页
摘要:You are installing a billboard and want it to have the largest height. The billboard will have two steel supports, one on each side. Each steel suppor 阅读全文
posted @ 2020-08-17 13:51 Grandyang 阅读(1438) 评论(0) 推荐(0) 编辑
摘要:We are given an array A of N lowercase letter strings, all of the same length. Now, we may choose any set of deletion indices, and for each string, we 阅读全文
posted @ 2020-08-07 15:28 Grandyang 阅读(1092) 评论(0) 推荐(0) 编辑
摘要:Given an array of integers A with even length, return true if and only if it is possible to reorder it such that A[2 * i + 1] = 2 * A[2 * i] for every 阅读全文
posted @ 2020-07-26 13:25 Grandyang 阅读(1491) 评论(0) 推荐(0) 编辑
摘要:In an alien language, surprisingly they also use english lowercase letters, but possibly in a different order. The order of the alphabet is some permu 阅读全文
posted @ 2020-07-08 15:47 Grandyang 阅读(2858) 评论(0) 推荐(0) 编辑
摘要:Given a non-empty array of unique positive integers A, consider the following graph: There are A.length nodes, labelled A[0] to A[A.length - 1]; There 阅读全文
posted @ 2020-07-06 10:22 Grandyang 阅读(1720) 评论(0) 推荐(0) 编辑
摘要:For a binary tree T, we can define a flip operation as follows: choose any node, and swap the left and right child subtrees. A binary tree X is flip e 阅读全文
posted @ 2020-07-02 15:00 Grandyang 阅读(1418) 评论(0) 推荐(0) 编辑
摘要:In a deck of cards, every card has a unique integer. You can order the deck in any order you want. Initially, all the cards start face down (unreveale 阅读全文
posted @ 2020-06-22 11:51 Grandyang 阅读(1426) 评论(0) 推荐(0) 编辑
摘要:Given an array of 4 digits, return the largest 24 hour time that can be made. The smallest 24 hour time is 00:00, and the largest is 23:59. Starting f 阅读全文
posted @ 2020-06-14 03:29 Grandyang 阅读(1660) 评论(0) 推荐(0) 编辑
摘要:You have an initial power P, an initial score of 0 points, and a bag of tokens. Each token can be used at most once, has a value token[i], and has pot 阅读全文
posted @ 2020-06-11 13:06 Grandyang 阅读(1520) 评论(0) 推荐(1) 编辑
摘要:On a 2D plane, we place stones at some integer coordinate points. Each coordinate point may have at most one stone. Now, a move consists of removing a 阅读全文
posted @ 2020-06-01 13:29 Grandyang 阅读(2313) 评论(1) 推荐(0) 编辑
摘要:Given two sequences pushed and popped with distinct values, return true if and only if this could have been the result of a sequence of push and pop o 阅读全文
posted @ 2020-05-26 03:44 Grandyang 阅读(2093) 评论(0) 推荐(1) 编辑
摘要:Given an array of integers A, a move consists of choosing any , and incrementing it by . Return the least number of moves to make every value in uniqu 阅读全文
posted @ 2020-05-18 07:56 Grandyang 阅读(1488) 评论(0) 推荐(0) 编辑
摘要:We are given an array of lowercase letter strings, all of the same length. Now, we may choose any set of deletion indices, and for each string, we del 阅读全文
posted @ 2020-05-11 06:16 Grandyang 阅读(1113) 评论(0) 推荐(0) 编辑
摘要:Given an array A of strings, find any smallest string that contains each string in A as a substring. We may assume that no string in A is substring of 阅读全文
posted @ 2020-05-08 14:15 Grandyang 阅读(2587) 评论(5) 推荐(0) 编辑
摘要:Given a string that only contains "I" (increase) or "D" (decrease), let . Return any permutation of such that for all : If , then Example 1: Example 2 阅读全文
posted @ 2020-04-30 04:33 Grandyang 阅读(1135) 评论(0) 推荐(0) 编辑
摘要:Given an array of integers, return if and only if it is a valid mountain array . Recall that A is a mountain array if and only if: There exists some w 阅读全文
posted @ 2020-04-27 07:19 Grandyang 阅读(1517) 评论(0) 推荐(1) 编辑
摘要:Given a string , count the number of distinct, non empty subsequences of . Since the result may be large, return the answer modulo . Example 1: Exampl 阅读全文
posted @ 2020-04-20 06:23 Grandyang 阅读(4628) 评论(0) 推荐(0) 编辑
摘要:Given a set of points in the xy plane, determine the minimum area of a rectangle formed from these points, with sides parallel to the x and y axes. If 阅读全文
posted @ 2020-04-13 06:26 Grandyang 阅读(3723) 评论(1) 推荐(0) 编辑
摘要:Given the node of a binary search tree, return the sum of values of all nodes with value between and (inclusive). The binary search tree is guaranteed 阅读全文
posted @ 2020-04-06 07:41 Grandyang 阅读(3412) 评论(0) 推荐(0) 编辑
摘要:You have an array of . Each log is a space delimited string of words. For each log, the first word in each log is an alphanumeric identifier . Then, e 阅读全文
posted @ 2020-03-30 07:45 Grandyang 阅读(3028) 评论(0) 推荐(0) 编辑

上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 61 下一页
Fork me on GitHub