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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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,
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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.
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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,
阅读全文

浙公网安备 33010602011771号