476. Number Complement
The complement of an integer is the integer you get when you flip all the 0‘s to 1‘s and all the 1‘s to 0‘s in its […]
The complement of an integer is the integer you get when you flip all the 0‘s to 1‘s and all the 1‘s to 0‘s in its […]
There is a strange printer with the following two special properties: The printer can only print a sequence of the same
Alice and Bob continue their games with piles of stones. There are a number of piles arranged in a row, and each pile
There is only one character ‘A’ on the screen of a notepad. You can perform one of two operations on this notepad
An ugly number is a positive integer whose prime factors are limited to 2, 3, and 5. Given an integer n, return the nth ugly number. Example 1: Input:
You are given an m x n integer matrix points (0-indexed). Starting with 0 points, you want to maximize the number of points you can get from the
You are given m arrays, where each array is sorted in ascending order. You can pick up two integers from two different arrays
At a lemonade stand, each lemonade costs $5. Customers are standing in a queue to buy from you and order one
The distance of a pair of integers a and b is defined as the absolute difference between a and b. Given an integer array nums and an integer k, return the kth smallest distance among all
Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numbers
Design a class to find the kth largest element in a stream. Note that it is the kth largest element in the sorted order,
You are given an m x n binary grid grid where 1 represents land and 0 represents water. An island is a maximal 4-directionally (horizontal or vertical) connected group of 1‘s. The grid