上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 61 下一页
摘要: Given an array of integers arr, and three integers a, b and c. You need to find the number of good triplets. A triplet (arr[i], arr[j], arr[k]) is goo 阅读全文
posted @ 2022-05-19 05:33 CNoodle 阅读(101) 评论(0) 推荐(0) 编辑
摘要: Given a 0-indexed integer array nums, return the number of distinct quadruplets (a, b, c, d) such that: nums[a] + nums[b] + nums[c] == nums[d], and a 阅读全文
posted @ 2022-05-17 02:50 CNoodle 阅读(177) 评论(0) 推荐(0) 编辑
摘要: Design a max stack data structure that supports the stack operations and supports finding the stack's maximum element. Implement the MaxStack class: M 阅读全文
posted @ 2022-03-20 06:41 CNoodle 阅读(512) 评论(0) 推荐(0) 编辑
摘要: You are given an integer array nums. You want to maximize the number of points you get by performing the following operation any number of times: Pick 阅读全文
posted @ 2022-03-05 14:53 CNoodle 阅读(136) 评论(0) 推荐(0) 编辑
摘要: You have a 2-D grid of size m x n representing a box, and you have n balls. The box is open on the top and bottom sides. Each cell in the box has a di 阅读全文
posted @ 2022-03-01 11:24 CNoodle 阅读(436) 评论(0) 推荐(0) 编辑
摘要: There are n dominoes in a line, and we place each domino vertically upright. In the beginning, we simultaneously push some of the dominoes either to t 阅读全文
posted @ 2022-02-28 14:32 CNoodle 阅读(83) 评论(0) 推荐(0) 编辑
摘要: There are n houses evenly lined up on the street, and each house is beautifully painted. You are given a 0-indexed integer array colors of length n, w 阅读全文
posted @ 2022-02-26 15:04 CNoodle 阅读(276) 评论(0) 推荐(0) 编辑
摘要: Given a 0-indexed integer array nums of size n, find the maximum difference between nums[i] and nums[j] (i.e., nums[j] - nums[i]), such that 0 <= i < 阅读全文
posted @ 2022-02-26 01:58 CNoodle 阅读(103) 评论(0) 推荐(0) 编辑
摘要: You are given two strings s1 and s2 of equal length. A string swap is an operation where you choose two indices in a string (not necessarily different 阅读全文
posted @ 2022-02-23 14:30 CNoodle 阅读(336) 评论(0) 推荐(0) 编辑
摘要: You are given an array nums of n positive integers. You can perform two types of operations on any element of the array any number of times: If the el 阅读全文
posted @ 2022-02-20 09:39 CNoodle 阅读(303) 评论(0) 推荐(0) 编辑
摘要: We have two special characters: The first character can be represented by one bit 0. The second character can be represented by two bits (10 or 11). G 阅读全文
posted @ 2022-02-20 06:03 CNoodle 阅读(61) 评论(0) 推荐(0) 编辑
摘要: You are given two integers, x and y, which represent your current location on a Cartesian grid: (x, y). You are also given an array points where each  阅读全文
posted @ 2022-02-15 12:01 CNoodle 阅读(300) 评论(0) 推荐(0) 编辑
摘要: Given an integer n, return a list of all simplified fractions between 0 and 1 (exclusive) such that the denominator is less-than-or-equal-to n. You ca 阅读全文
posted @ 2022-02-10 11:36 CNoodle 阅读(80) 评论(0) 推荐(0) 编辑
摘要: You are given an array of unique integers salary where salary[i] is the salary of the ith employee. Return the average salary of employees excluding t 阅读全文
posted @ 2022-02-07 14:39 CNoodle 阅读(235) 评论(0) 推荐(0) 编辑
摘要: Given two non-negative integers low and high. Return the count of odd numbers between low and high (inclusive). Example 1: Input: low = 3, high = 7 Ou 阅读全文
posted @ 2022-02-07 14:02 CNoodle 阅读(213) 评论(0) 推荐(0) 编辑
摘要: Given a 0-indexed string word and a character ch, reverse the segment of word that starts at index 0 and ends at the index of the first occurrence of 阅读全文
posted @ 2022-02-06 07:15 CNoodle 阅读(121) 评论(2) 推荐(0) 编辑
摘要: You are given an integer array nums. The unique elements of an array are the elements that appear exactly once in the array. Return the sum of all the 阅读全文
posted @ 2022-02-06 05:59 CNoodle 阅读(88) 评论(0) 推荐(0) 编辑
摘要: You are given an array rectangles where rectangles[i] = [li, wi] represents the ith rectangle of length li and width wi. You can cut the ith rectangle 阅读全文
posted @ 2022-02-04 14:58 CNoodle 阅读(159) 评论(0) 推荐(0) 编辑
摘要: A string s is nice if, for every letter of the alphabet that s contains, it appears both in uppercase and lowercase. For example, "abABB" is nice beca 阅读全文
posted @ 2022-02-01 02:03 CNoodle 阅读(476) 评论(0) 推荐(0) 编辑
摘要: You are playing a game that contains multiple characters, and each of the characters has two main properties: attack and defense. You are given a 2D i 阅读全文
posted @ 2022-01-29 00:10 CNoodle 阅读(341) 评论(0) 推荐(0) 编辑
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 61 下一页