上一页 1 2 3 4 5 6 ··· 59 下一页
摘要: You are given a binary string s that contains at least one '1'. You have to rearrange the bits in such a way that the resulting binary number is the m 阅读全文
posted @ 2024-03-01 11:20 CNoodle 阅读(42) 评论(0) 推荐(0) 编辑
摘要: You are given the root of a binary tree and a positive integer k. The level sum in the tree is the sum of the values of the nodes that are on the same 阅读全文
posted @ 2024-02-28 09:43 CNoodle 阅读(8) 评论(0) 推荐(0) 编辑
摘要: You are given the root of a binary search tree and an array queries of size n consisting of positive integers. Find a 2D array answer of size n where 阅读全文
posted @ 2024-02-26 13:30 CNoodle 阅读(4) 评论(0) 推荐(0) 编辑
摘要: Given an array of strings words, return the first palindromic string in the array. If there is no such string, return an empty string "". A string is 阅读全文
posted @ 2024-02-13 14:03 CNoodle 阅读(12) 评论(0) 推荐(0) 编辑
摘要: Given the root of a binary tree, replace the value of each node in the tree with the sum of all its cousins' values. Two nodes of a binary tree are co 阅读全文
posted @ 2024-02-08 09:07 CNoodle 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 小扣当前位于魔塔游戏第一层,共有 N 个房间,编号为 0 ~ N-1。a56爆大奖在线娱乐房间的补血道具/怪物对于血量影响记于数组 nums,其中正数a56爆大奖在线娱乐道具补血数值,即血量增加对应数值;负数a56爆大奖在线娱乐怪物造成伤害值,即血量减少对应数值;0 a56爆大奖在线娱乐房间对血量无影响。 小扣初始血量为 1,且无上限。假定小扣原计划按房间编号升 阅读全文
posted @ 2024-02-06 16:14 CNoodle 阅读(17) 评论(0) 推荐(0) 编辑
摘要: You are playing the following Nim Game with your friend: Initially, there is a heap of stones on the table. You and your friend will alternate taking 阅读全文
posted @ 2024-02-04 05:02 CNoodle 阅读(3) 评论(0) 推荐(0) 编辑
摘要: You are given an integer array nums of size n and a positive integer k. Divide the array into one or more arrays of size 3 satisfying the following co 阅读全文
posted @ 2024-02-02 12:53 CNoodle 阅读(6) 评论(0) 推荐(0) 编辑
摘要: You are given a 0-indexed integer array nums and an integer k. Return an integer that denotes the sum of elements in nums whose corresponding indices 阅读全文
posted @ 2024-01-25 15:05 CNoodle 阅读(9) 评论(0) 推荐(0) 编辑
摘要: You are given a 0-indexed array words consisting of distinct strings. The string words[i] can be paired with the string words[j] if: The string words[ 阅读全文
posted @ 2024-01-17 02:39 CNoodle 阅读(17) 评论(0) 推荐(0) 编辑
摘要: Given two string arrays words1 and words2, return the number of strings that appear exactly once in each of the two arrays. Example 1: Input: words1 = 阅读全文
posted @ 2024-01-12 11:45 CNoodle 阅读(10) 评论(0) 推荐(0) 编辑
摘要: You are given a string s consisting only of uppercase English letters. You can apply some operations to this string where, in one operation, you can r 阅读全文
posted @ 2024-01-10 02:14 CNoodle 阅读(12) 评论(0) 推荐(0) 编辑
摘要: Given an integer array nums, return the greatest common divisor of the smallest number and largest number in nums. The greatest common divisor of two 阅读全文
posted @ 2024-01-08 00:52 CNoodle 阅读(3) 评论(0) 推荐(0) 编辑
摘要: Given the head of a linked list head, in which each node contains an integer value. Between every pair of adjacent nodes, insert a new node with a val 阅读全文
posted @ 2024-01-08 00:48 CNoodle 阅读(4) 评论(0) 推荐(0) 编辑
摘要: Alice has n balloons arranged on a rope. You are given a 0-indexed string colors where colors[i] is the color of the ith balloon. Alice wants the rope 阅读全文
posted @ 2023-12-28 08:39 CNoodle 阅读(12) 评论(0) 推荐(0) 编辑
摘要: You are given two 0-indexed integer arrays player1 and player2, that represent the number of pins that player 1 and player 2 hit in a bowling game, re 阅读全文
posted @ 2023-12-27 06:54 CNoodle 阅读(19) 评论(0) 推荐(0) 编辑
摘要: Given a string path, where path[i] = 'N', 'S', 'E' or 'W', each representing moving one unit north, south, east, or west, respectively. You start at t 阅读全文
posted @ 2023-12-24 05:14 CNoodle 阅读(11) 评论(0) 推荐(0) 编辑
摘要: Given the root of a perfect binary tree, reverse the node values at each odd level of the tree. For example, suppose the node values at level 3 are [2 阅读全文
posted @ 2023-12-17 05:57 CNoodle 阅读(8) 评论(0) 推荐(0) 编辑
摘要: You are given a 0-indexed m x n binary matrix grid. A 0-indexed m x n difference matrix diff is created with the following procedure: Let the number o 阅读全文
posted @ 2023-12-16 09:23 CNoodle 阅读(4) 评论(0) 推荐(0) 编辑
摘要: You are given a string s consisting of lowercase English letters, and you are allowed to perform operations on it. In one operation, you can replace a 阅读全文
posted @ 2023-12-14 05:12 CNoodle 阅读(4) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 59 下一页