07 2023 档案

摘要:You are given an integer array nums. Two players are playing a game with this array: player 1 and player 2. Player 1 and player 2 take turns, with pla 阅读全文
posted @ 2023-07-29 01:21 CNoodle 阅读(90) 评论(0) 推荐(0)
摘要:You are given a floating-point number hour, representing the amount of time you have to reach the office. To commute to the office, you must take n tr 阅读全文
posted @ 2023-07-27 00:58 CNoodle 阅读(69) 评论(0) 推荐(0)
摘要:You are given a stream of points on the X-Y plane. Design an algorithm that: Adds new points from the stream into a data structure. Duplicate points a 阅读全文
posted @ 2023-07-26 05:47 CNoodle 阅读(164) 评论(0) 推荐(0)
摘要:You are given an array nums of positive integers. In one operation, you can choose any number from nums and reduce it to exactly half the number. (Not 阅读全文
posted @ 2023-07-25 01:01 CNoodle 阅读(59) 评论(0) 推荐(0)
摘要:Given an integer n, return a list of all possible full binary trees with n nodes. Each node of each tree in the answer must have Node.val == 0. Each e 阅读全文
posted @ 2023-07-23 11:25 CNoodle 阅读(69) 评论(0) 推荐(0)
摘要:You are given a 0-indexed integer array nums of length n. You are initially standing at index 0. You can jump from index i to index j where i < j if: 阅读全文
posted @ 2023-07-21 03:00 CNoodle 阅读(343) 评论(0) 推荐(0)
摘要:You are given n tables represented with two arrays names and columns, where names[i] is the name of the ith table and columns[i] is the number of colu 阅读全文
posted @ 2023-07-21 02:21 CNoodle 阅读(114) 评论(0) 推荐(0)
摘要:You have a keypad with 9 buttons, numbered from 1 to 9, each mapped to lowercase English letters. You can choose which characters each button is match 阅读全文
posted @ 2023-07-20 09:03 CNoodle 阅读(332) 评论(0) 推荐(0)
摘要:You are given two 0-indexed integer arrays jobs and workers of equal length, where jobs[i] is the amount of time needed to complete the ith job, and w 阅读全文
posted @ 2023-07-20 07:49 CNoodle 阅读(198) 评论(0) 推荐(0)
摘要:You are given a 0-indexed string s consisting of only lowercase English letters. In one operation, you can change any character of s to any other char 阅读全文
posted @ 2023-07-20 07:18 CNoodle 阅读(106) 评论(0) 推荐(0)
摘要:You are given a 0-indexed integer array nums. Swaps of adjacent elements are able to be performed on nums. A valid array meets the following condition 阅读全文
posted @ 2023-07-20 06:58 CNoodle 阅读(222) 评论(0) 推荐(0)
摘要:You are given an array nums consisting of positive integers. You can perform the following operation on the array any number of times: Choose any two  阅读全文
posted @ 2023-07-20 04:26 CNoodle 阅读(119) 评论(0) 推荐(0)
摘要:Given the root of a binary tree and an array of TreeNode objects nodes, return the lowest common ancestor (LCA) of all the nodes in nodes. All the nod 阅读全文
posted @ 2023-07-20 01:48 CNoodle 阅读(119) 评论(0) 推荐(0)
摘要:You are given two strings s and t consisting of only lowercase English letters. Return the minimum number of characters that need to be appended to th 阅读全文
posted @ 2023-07-19 22:23 CNoodle 阅读(85) 评论(0) 推荐(0)
摘要:You are given an integer array nums and an integer k. Find the maximum subarray sum of all the subarrays of nums that meet the following conditions: T 阅读全文
posted @ 2023-07-19 13:09 CNoodle 阅读(163) 评论(0) 推荐(0)
摘要:You are given a 0-indexed binary string s which represents the types of buildings along a street where: s[i] = '0' denotes that the ith building is an 阅读全文
posted @ 2023-07-19 12:30 CNoodle 阅读(82) 评论(0) 推荐(0)
摘要:A robot on an infinite XY-plane starts at point (0, 0) facing north. The robot can receive a sequence of these three possible types of commands: -2: T 阅读全文
posted @ 2023-07-19 06:55 CNoodle 阅读(75) 评论(0) 推荐(0)
摘要:You are given an array nums of positive integers and a positive integer k. A subset of nums is beautiful if it does not contain two integers with an a 阅读全文
posted @ 2023-07-19 03:59 CNoodle 阅读(324) 评论(0) 推荐(0)
摘要:You are given a 2D integer array intervals, where intervals[i] = [lefti, righti] describes the ith interval starting at lefti and ending at righti (in 阅读全文
posted @ 2023-07-18 04:11 CNoodle 阅读(111) 评论(0) 推荐(0)
摘要:Given an integer array arr and an integer difference, return the length of the longest subsequence in arr which is an arithmetic sequence such that th 阅读全文
posted @ 2023-07-15 06:54 CNoodle 阅读(71) 评论(0) 推荐(0)
摘要:You are given two 0-indexed integer arrays nums1 and nums2 of equal length n and a positive integer k. You must choose a subsequence of indices from n 阅读全文
posted @ 2023-07-13 09:43 CNoodle 阅读(313) 评论(0) 推荐(0)
摘要:Given an n x n array of integers matrix, return the minimum sum of any falling path through matrix. A falling path starts at any element in the first 阅读全文
posted @ 2023-07-13 07:59 CNoodle 阅读(56) 评论(0) 推荐(0)
摘要:A teacher is writing a test with n true/false questions, with 'T' denoting true and 'F' denoting false. He wants to confuse the students by maximizing 阅读全文
posted @ 2023-07-07 09:14 CNoodle 阅读(130) 评论(0) 推荐(0)
摘要:You are given an integer finalSum. Split it into a sum of a maximum number of unique positive even integers. For example, given finalSum = 12, the fol 阅读全文
posted @ 2023-07-06 10:04 CNoodle 阅读(62) 评论(0) 推荐(0)
摘要:There is a bag that consists of items, each item has a number 1, 0, or -1 written on it. You are given four non-negative integers numOnes, numZeros, n 阅读全文
posted @ 2023-07-06 06:57 CNoodle 阅读(36) 评论(0) 推荐(0)
摘要:You are given a 0-indexed 2D integer array nums. Initially, your score is 0. Perform the following operations until the matrix becomes empty: From eac 阅读全文
posted @ 2023-07-05 07:59 CNoodle 阅读(68) 评论(0) 推荐(0)