05 2021 档案

摘要:You have some number of sticks with positive integer lengths. These lengths are given as an array sticks, where sticks[i] is the length of the ith sti 阅读全文
posted @ 2021-05-31 06:05 CNoodle 阅读(165) 评论(0) 推荐(0)
摘要:You are given the root of a binary tree. We install cameras on the tree nodes where each camera at a node can monitor its parent, itself, and its imme 阅读全文
posted @ 2021-05-31 05:04 CNoodle 阅读(117) 评论(0) 推荐(0)
摘要:Given a list of strings words and a string pattern, return a list of words[i] that match pattern. You may return the answer in any order. A word match 阅读全文
posted @ 2021-05-23 02:07 CNoodle 阅读(133) 评论(0) 推荐(0)
摘要:You are given an array of words where each word consists of lowercase English letters. wordA is a predecessor of wordB if and only if we can insert ex 阅读全文
posted @ 2021-05-23 00:57 CNoodle 阅读(269) 评论(0) 推荐(0)
摘要:Suppose we have a file system that stores both files and directories. An example of one system is represented in the following picture: Here, we have  阅读全文
posted @ 2021-05-22 15:27 CNoodle 阅读(282) 评论(0) 推荐(0)
摘要:You are given a license key represented as a string s that consists of only alphanumeric characters and dashes. The string is separated into n + 1 gro 阅读全文
posted @ 2021-05-22 00:20 CNoodle 阅读(154) 评论(0) 推荐(0)
摘要:We are given a binary tree (with root node root), a target node, and an integer value k. Return a list of the values of all nodes that have a distance 阅读全文
posted @ 2021-05-18 23:42 CNoodle 阅读(145) 评论(0) 推荐(0)
摘要:There are n cities numbered from 0 to n-1 and n-1 roads such that there is only one way to travel between two different cities (this network form a tr 阅读全文
posted @ 2021-05-18 00:46 CNoodle 阅读(591) 评论(0) 推荐(0)
摘要:Given the head of a linked list, we repeatedly delete consecutive sequences of nodes that sum to 0 until there are no such sequences. After doing so, 阅读全文
posted @ 2021-05-17 05:01 CNoodle 阅读(96) 评论(0) 推荐(0)
摘要:Given the head of a linked list and two integers m and n. Traverse the linked list and remove some nodes in the following way: Start with the head as 阅读全文
posted @ 2021-05-15 12:56 CNoodle 阅读(634) 评论(0) 推荐(0)
摘要:Given the head of a linked list, find all the values that appear more than once in the list and delete the nodes that have any of those values. Return 阅读全文
posted @ 2021-05-14 23:43 CNoodle 阅读(685) 评论(0) 推荐(0)
摘要:You are given an integer array heights representing the heights of buildings, some bricks, and some ladders. You start your journey from building 0 an 阅读全文
posted @ 2021-05-13 06:04 CNoodle 阅读(543) 评论(0) 推荐(0)
摘要:Consider all the leaves of a binary tree, from left to right order, the values of those leaves form a leaf value sequence. For example, in the given t 阅读全文
posted @ 2021-05-10 02:31 CNoodle 阅读(83) 评论(0) 推荐(0)
摘要:There is a hidden integer array arr that consists of n non-negative integers. It was encoded into another integer array encoded of length n - 1, such 阅读全文
posted @ 2021-05-06 14:23 CNoodle 阅读(264) 评论(0) 推荐(0)
摘要: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 阅读(180) 评论(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 阅读(116) 评论(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 阅读(188) 评论(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 阅读(264) 评论(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 阅读(271) 评论(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 阅读(240) 评论(0) 推荐(0)