上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 64 下一页
摘要: Given a binary array nums and an integer goal, return the number of non-empty subarrays with a sum goal. A subarray is a contiguous part of the array. 阅读全文
posted @ 2021-05-05 15:44 CNoodle 阅读(169) 评论(0) 推荐(0)
摘要: Design a data structure that is initialized with a list of different words. Provided a string, you should determine if you can change exactly one char 阅读全文
posted @ 2021-05-05 00:24 CNoodle 阅读(104) 评论(0) 推荐(0)
摘要: There is a hotel with n rooms. The rooms are represented by a 2D integer array rooms where rooms[i] = [roomIdi, sizei] denotes that there is a room wi 阅读全文
posted @ 2021-05-02 03:00 CNoodle 阅读(184) 评论(0) 推荐(0)
摘要: You are given an array of positive integers arr. Perform some operations (possibly none) on arr so that it satisfies these conditions: The value of th 阅读全文
posted @ 2021-05-02 01:30 CNoodle 阅读(256) 评论(0) 推荐(0)
摘要: Design a system that manages the reservation state of n seats that are numbered from 1 to n. Implement the SeatManager class: SeatManager(int n) Initi 阅读全文
posted @ 2021-05-02 00:58 CNoodle 阅读(265) 评论(0) 推荐(0)
摘要: You are given a 0-indexed string s that has lowercase English letters in its even indices and digits in its odd indices. There is a function shift(c, 阅读全文
posted @ 2021-05-02 00:42 CNoodle 阅读(232) 评论(0) 推荐(0)
摘要: Design a Leaderboard class, which has 3 functions: addScore(playerId, score): Update the leaderboard by adding score to the given player's score. If t 阅读全文
posted @ 2021-04-27 06:32 CNoodle 阅读(689) 评论(0) 推荐(0)
摘要: You want to build n new buildings in a city. The new buildings will be built in a line and are labeled from 1 to n. However, there are city restrictio 阅读全文
posted @ 2021-04-27 00:20 CNoodle 阅读(134) 评论(0) 推荐(0)
摘要: A string is considered beautiful if it satisfies the following conditions: Each of the 5 English vowels ('a', 'e', 'i', 'o', 'u') must appear at least 阅读全文
posted @ 2021-04-26 05:21 CNoodle 阅读(285) 评论(0) 推荐(0)
摘要: The frequency of an element is the number of times it occurs in an array. You are given an integer array nums and an integer k. In one operation, you 阅读全文
posted @ 2021-04-26 04:54 CNoodle 阅读(355) 评论(0) 推荐(0)
摘要: Given an integer n (in base 10) and a base k, return the sum of the digits of n after converting n from base 10 to base k. After converting, each digi 阅读全文
posted @ 2021-04-25 15:10 CNoodle 阅读(189) 评论(0) 推荐(0)
摘要: Given an array nums which consists of non-negative integers and an integer m, you can split the array into m non-empty continuous subarrays. Write an 阅读全文
posted @ 2021-04-25 01:29 CNoodle 阅读(157) 评论(0) 推荐(0)
摘要: In an infinite binary tree where every node has two children, the nodes are labelled in row order. In the odd numbered rows (ie., the first, third, fi 阅读全文
posted @ 2021-04-23 14:57 CNoodle 阅读(76) 评论(0) 推荐(0)
摘要: On the first row, we write a 0. Now in every subsequent row, we look at the previous row and replace each occurrence of 0 with 01, and each occurrence 阅读全文
posted @ 2021-04-22 23:50 CNoodle 阅读(182) 评论(0) 推荐(0)
摘要: Imagine you have a special keyboard with the following keys: Key 1: (A): Print one 'A' on screen. Key 2: (Ctrl-A): Select the whole screen. Key 3: (Ct 阅读全文
posted @ 2021-04-18 05:07 CNoodle 阅读(248) 评论(0) 推荐(0)
摘要: Design a queue that supports push and pop operations in the front, middle, and back. Implement the FrontMiddleBack class: FrontMiddleBack() Initialize 阅读全文
posted @ 2021-04-18 02:15 CNoodle 阅读(185) 评论(0) 推荐(0)
摘要: Given the root of a binary tree, consider all root to leaf paths: paths from the root to any leaf. (A leaf is a node with no children.) A node is insu 阅读全文
posted @ 2021-04-15 01:21 CNoodle 阅读(89) 评论(0) 推荐(0)
摘要: Given the root of a binary tree, return the sum of values of its deepest leaves. Example 1: Input: root = [1,2,3,4,5,null,6,7,null,null,null,null,8] O 阅读全文
posted @ 2021-04-13 12:30 CNoodle 阅读(267) 评论(0) 推荐(0)
摘要: You are given a string s of even length. Split this string into two halves of equal lengths, and let a be the first half and b be the second half. Two 阅读全文
posted @ 2021-04-08 13:29 CNoodle 阅读(146) 评论(0) 推荐(0)
摘要: You are given an integer array nums of length n which represents a permutation of all the integers in the range [0, n - 1]. The number of global inver 阅读全文
posted @ 2021-04-05 23:13 CNoodle 阅读(115) 评论(0) 推荐(0)
上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 64 下一页