10 2024 档案

摘要:Given a string s containing only digits, return the lexicographically smallest string that can be obtained after swapping adjacent digits in s with th 阅读全文
posted @ 2024-10-30 10:04 CNoodle 阅读(95) 评论(0) 推荐(0)
摘要:For a binary tree T, we can define a flip operation as follows: choose any node, and swap the left and right child subtrees. A binary tree X is flip e 阅读全文
posted @ 2024-10-24 12:41 CNoodle 阅读(38) 评论(0) 推荐(0)
摘要:Given an integer array hours representing times in hours, return an integer denoting the number of pairs i, j where i < j and hours[i] + hours[j] form 阅读全文
posted @ 2024-10-22 04:55 CNoodle 阅读(51) 评论(0) 推荐(0)
摘要: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 阅读(51) 评论(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 阅读(61) 评论(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 阅读(35) 评论(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 阅读(77) 评论(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 阅读(43) 评论(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 阅读(52) 评论(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 阅读(92) 评论(0) 推荐(0)