上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 64 下一页
摘要: Given an integer k, return the minimum number of Fibonacci numbers whose sum is equal to k. The same Fibonacci number can be used multiple times. The 阅读全文
posted @ 2021-02-08 16:08 CNoodle 阅读(217) 评论(0) 推荐(0)
摘要: Given a string s and a character c that occurs in s, return an array of integers answer where answer.length == s.length and answer[i] is the shortest 阅读全文
posted @ 2021-02-08 03:23 CNoodle 阅读(118) 评论(0) 推荐(0)
摘要: Given an array nums with n integers, your task is to check if it could become non-decreasing by modifying at most one element. We define an array is n 阅读全文
posted @ 2021-02-07 04:16 CNoodle 阅读(140) 评论(0) 推荐(0)
摘要: There are several cards arranged in a row, and each card has an associated number of points. The points are given in the integer array cardPoints. In 阅读全文
posted @ 2021-02-06 16:15 CNoodle 阅读(440) 评论(0) 推荐(0)
摘要: We define a harmonious array as an array where the difference between its maximum value and its minimum value is exactly 1. Given an integer array num 阅读全文
posted @ 2021-02-06 13:20 CNoodle 阅读(128) 评论(0) 推荐(0)
摘要: You are given a string s that consists of lower case English letters and brackets. Reverse the strings in each pair of matching parentheses, starting  阅读全文
posted @ 2021-02-05 16:53 CNoodle 阅读(166) 评论(0) 推荐(0)
摘要: Given an integer array arr, and an integer target, return the number of tuples i, j, k such that i < j < k and arr[i] + arr[j] + arr[k] == target. As 阅读全文
posted @ 2021-02-05 03:12 CNoodle 阅读(177) 评论(0) 推荐(0)
摘要: You are given an integer array nums consisting of n elements, and an integer k. Find a contiguous subarray whose length is equal to k that has the max 阅读全文
posted @ 2021-02-05 01:18 CNoodle 阅读(310) 评论(0) 推荐(0)
摘要: Given the root of a binary search tree and the lowest and highest boundaries as low and high, trim the tree so that all its elements lies in [low, hig 阅读全文
posted @ 2021-02-03 16:14 CNoodle 阅读(199) 评论(0) 推荐(0)
摘要: There is an integer array nums that consists of n unique elements, but you have forgotten it. However, you do remember every pair of adjacent elements 阅读全文
posted @ 2021-02-02 02:01 CNoodle 阅读(294) 评论(0) 推荐(0)
摘要: Alice and Bob have candy bars of different sizes: A[i] is the size of the i-th bar of candy that Alice has, and B[j] is the size of the j-th bar of ca 阅读全文
posted @ 2021-02-01 06:29 CNoodle 阅读(81) 评论(0) 推荐(0)
摘要: Given a matrix of integers A with R rows and C columns, find the maximum score of a path starting at [0,0] and ending at [R-1,C-1]. The score of a pat 阅读全文
posted @ 2021-01-31 15:25 CNoodle 阅读(727) 评论(0) 推荐(0)
摘要: You are a hiker preparing for an upcoming hike. You are given heights, a 2D array of size rows x columns, where heights[row][col] represents the heigh 阅读全文
posted @ 2021-01-31 08:08 CNoodle 阅读(1187) 评论(0) 推荐(0)
摘要: Given a root of an N-ary tree, you need to compute the length of the diameter of the tree. The diameter of an N-ary tree is the length of the longest  阅读全文
posted @ 2021-01-30 16:22 CNoodle 阅读(832) 评论(0) 推荐(0)
摘要: A company has n employees with a unique ID for each employee from 0 to n - 1. The head of the company has is the one with headID. Each employee has on 阅读全文
posted @ 2021-01-30 07:53 CNoodle 阅读(645) 评论(0) 推荐(0)
摘要: The numeric value of a lowercase character is defined as its position (1-indexed) in the alphabet, so the numeric value of a is 1, the numeric value o 阅读全文
posted @ 2021-01-29 12:36 CNoodle 阅读(244) 评论(0) 推荐(0)
摘要: Given an array arr of 4 digits, find the latest 24-hour time that can be made using each digit exactly once. 24-hour times are formatted as "HH:MM", w 阅读全文
posted @ 2021-01-27 01:23 CNoodle 阅读(180) 评论(0) 推荐(0)
摘要: Given a list of dominoes, dominoes[i] = [a, b] is equivalent to dominoes[j] = [c, d] if and only if either (a==c and b==d), or (a==d and b==c) - that 阅读全文
posted @ 2021-01-27 00:41 CNoodle 阅读(160) 评论(0) 推荐(0)
摘要: Two strings are considered close if you can attain one from the other using the following operations: Operation 1: Swap any two existing characters. F 阅读全文
posted @ 2021-01-25 15:45 CNoodle 阅读(462) 评论(0) 推荐(0)
摘要: A cinema has n rows of seats, numbered from 1 to n and there are ten seats in each row, labelled from 1 to 10 as shown in the figure above. Given the 阅读全文
posted @ 2021-01-24 17:20 CNoodle 阅读(727) 评论(0) 推荐(0)
上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 64 下一页