摘要:
Design the CombinationIterator class: CombinationIterator(string characters, int combinationLength) Initializes the object with a string characters of 阅读全文
摘要:
In LeetCode Store, there are n items to sell. Each item has a price. However, there are some special offers, and a special offer consists of one or mo 阅读全文
摘要:
You are given the array paths, where paths[i] = [cityAi, cityBi] means there exists a direct path going from cityAi to cityBi. Return the destination 阅读全文
摘要:
Given an integer num, return a string representing its hexadecimal representation. For negative integers, two’s complement method is used. All the let 阅读全文
摘要:
Given a 0-indexed integer array nums, return true if it can be made strictly increasing after removing exactly one element, or false otherwise. If the 阅读全文
摘要:
Given the array prices where prices[i] is the price of the ith item in a shop. There is a special discount for items in the shop, if you buy the ith i 阅读全文
摘要:
There is only one character 'A' on the screen of a notepad. You can perform two operations on this notepad for each step: Copy All: You can copy all t 阅读全文
摘要:
Given the root of a binary search tree, return a balanced binary search tree with the same node values. If there is more than one answer, return any o 阅读全文
摘要:
Given a string s, reverse the string according to the following rules: All the characters that are not English letters remain in the same position. Al 阅读全文
摘要:
Given a string text, you want to use the characters of text to form as many instances of the word "balloon" as possible. You can use each character in 阅读全文
摘要:
You are given n points in the plane that are all distinct, where points[i] = [xi, yi]. A boomerang is a tuple of points (i, j, k) such that the distan 阅读全文
摘要:
There are n students in a class numbered from 0 to n - 1. The teacher will give each student a problem starting with the student number 0, then the st 阅读全文
摘要:
Given an array points where points[i] = [xi, yi] represents a point on the X-Y plane, return true if these points are a boomerang. A boomerang is a se 阅读全文
摘要:
Given the root of a binary tree, return the number of nodes where the value of the node is equal to the sum of the values of its descendants. A descen 阅读全文
摘要:
A newly designed keypad was tested, where a tester pressed a sequence of n keys, one at a time. You are given a string keysPressed of length n, where 阅读全文
摘要:
You are given a string s, and an array of pairs of indices in the string pairs where pairs[i] = [a, b] indicates 2 indices(0-indexed) of the string. Y 阅读全文
摘要:
Given the API rand7() that generates a uniform random integer in the range [1, 7], write a function rand10() that generates a uniform random integer i 阅读全文
摘要:
You are given a 0-indexed integer array nums, where nums[i] represents the score of the ith student. You are also given an integer k. Pick the scores 阅读全文
摘要:
Given an array of positive integers arr, calculate the sum of all possible odd-length subarrays. A subarray is a contiguous subsequence of the array. 阅读全文
摘要:
Given the root of a Binary Search Tree and a target number k, return true if there exist two elements in the BST such that their sum is equal to the g 阅读全文