上一页 1 2 3 4 5 6 7 8 9 ··· 64 下一页
摘要: You are given an integer array nums and an integer k. For each index i where 0 <= i < nums.length, change nums[i] to be either nums[i] + k or nums[i] 阅读全文
posted @ 2024-10-21 10:23 CNoodle 阅读(43) 评论(0) 推荐(0)
摘要: Given two positive integers n and k, the binary string Sn is formed as follows: S1 = "0" Si = Si - 1 + "1" + reverse(invert(Si - 1)) for i > 1 Where + 阅读全文
posted @ 2024-10-20 03:03 CNoodle 阅读(41) 评论(0) 推荐(0)
摘要: You are given an integer array nums and an integer k. In one operation, you can choose any index i where 0 <= i < nums.length and change nums[i] to nu 阅读全文
posted @ 2024-10-20 01:54 CNoodle 阅读(24) 评论(0) 推荐(0)
摘要: You are given a 2D integer array intervals where intervals[i] = [left, right] represents the inclusive interval [left, right]. You have to divide the 阅读全文
posted @ 2024-10-13 01:50 CNoodle 阅读(55) 评论(0) 推荐(0)
摘要: A ramp in an integer array nums is a pair (i, j) for which i < j and nums[i] <= nums[j]. The width of such a ramp is j - i. Given an integer array num 阅读全文
posted @ 2024-10-11 05:56 CNoodle 阅读(32) 评论(0) 推荐(0)
摘要: You are given a positive integer array skill of even length n where skill[i] denotes the skill of the ith player. Divide the players into n / 2 teams 阅读全文
posted @ 2024-10-05 04:02 CNoodle 阅读(38) 评论(0) 推荐(0)
摘要: Given an array of integers arr of even length n and an integer k. We want to divide the array into exactly n / 2 pairs such that the sum of each pair 阅读全文
posted @ 2024-10-02 06:23 CNoodle 阅读(73) 评论(0) 推荐(0)
摘要: Design your implementation of the circular double-ended queue (deque). Implement the MyCircularDeque class: MyCircularDeque(int k) Initializes the deq 阅读全文
posted @ 2024-09-29 02:11 CNoodle 阅读(34) 评论(0) 推荐(0)
摘要: An alphabetical continuous string is a string consisting of consecutive letters in the alphabet. In other words, it is any substring of the string "ab 阅读全文
posted @ 2024-09-20 04:27 CNoodle 阅读(34) 评论(0) 推荐(0)
摘要: A sentence is a string of single-space separated words where each word consists only of lowercase letters. A word is uncommon if it appears exactly on 阅读全文
posted @ 2024-09-18 02:57 CNoodle 阅读(35) 评论(0) 推荐(0)
摘要: You are given an integer array nums of size n. Consider a non-empty subarray from nums that has the maximum possible bitwise AND. In other words, let 阅读全文
posted @ 2024-09-15 03:28 CNoodle 阅读(42) 评论(0) 推荐(0)
摘要: You are given two integers m and n, which represent the dimensions of a matrix. You are also given the head of a linked list of integers. Generate an 阅读全文
posted @ 2024-09-15 00:41 CNoodle 阅读(56) 评论(0) 推荐(0)
摘要: You start at the cell (rStart, cStart) of an rows x cols grid facing east. The northwest corner is at the first row and column in the grid, and the so 阅读全文
posted @ 2024-09-14 14:58 CNoodle 阅读(42) 评论(0) 推荐(0)
摘要: You are given the head of a linked list, which contains a series of integers separated by 0's. The beginning and end of the linked list will have Node 阅读全文
posted @ 2024-09-09 10:36 CNoodle 阅读(27) 评论(0) 推荐(0)
摘要: You are given a 2D matrix grid of size m x n. You need to check if each cell grid[i][j] is: Equal to the cell below it, i.e. grid[i][j] == grid[i + 1] 阅读全文
posted @ 2024-08-29 05:27 CNoodle 阅读(42) 评论(0) 推荐(0)
摘要: A distinct string is a string that is present only once in an array. Given an array of strings arr, and an integer k, return the kth distinct string p 阅读全文
posted @ 2024-08-05 14:25 CNoodle 阅读(48) 评论(0) 推荐(0)
摘要: A swap is defined as taking two distinct positions in an array and swapping the values in them. A circular array is defined as an array where we consi 阅读全文
posted @ 2024-08-04 02:56 CNoodle 阅读(89) 评论(0) 推荐(0)
摘要: Given an m x n matrix of distinct numbers, return all lucky numbers in the matrix in any order. A lucky number is an element of the matrix such that i 阅读全文
posted @ 2024-07-19 13:14 CNoodle 阅读(75) 评论(0) 推荐(0)
摘要: You are given a binary array possible of length n. Alice and Bob are playing a game that consists of n levels. Some of the levels in the game are impo 阅读全文
posted @ 2024-07-19 06:16 CNoodle 阅读(30) 评论(0) 推荐(0)
摘要: You are given a 2D integer array descriptions where descriptions[i] = [parenti, childi, isLefti] indicates that parenti is the parent of childi in a b 阅读全文
posted @ 2024-07-17 00:41 CNoodle 阅读(15) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 ··· 64 下一页