204. Count Primes
Given an integer n, return the number of prime numbers that are strictly less than n.
Read more →Given an integer n, return the number of prime numbers that are strictly less than n.
Read more →Given an array of strings strs, group the anagrams together. You can return the answer in any order.
Read more →There are a total of numCourses courses you have to take, labeled from 0 to numCourses - 1
Read more →Given an integer array nums, find a subarray that has the largest product, and return the product.
Read more →You are given an array representing a row of seats where seats[i] = 1 represents a person sitting in the ith seat, and seats[i] = 0 represents that the ith.
Read more →The Hamming distance between two integers is the number of positions at which the corresponding bits are different.
Read more →Given a sorted array of distinct integers and a target value, return the index if the target is found. If not, return the index where it would be if it were.
Read more →We define the usage of capitals in a word to be right when one of the following cases holds:
Read more →You are given an array of integers nums, there is a sliding window of size k.
Read more →A message containing letters from A-Z is being encoded to numbers using the following mapping.
Read more →Given a positive integer num, return true if num is a perfect square or false otherwise.
Read more →Given two binary strings a and b, return their sum as a binary string.
Read more →Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the signed 32-bit integer range.
Read more →The count-and-say sequence is a sequence of digit strings defined by the recursive formula
Read more →There is a rectangular brick wall in front of you with n rows of bricks. The ith row has some number of bricks each of the same height (i.e., one unit)
Read more →You are given two non-empty linked lists representing two non-negative integers.
Read more →A binary watch has 4 LEDs on the top to represent the hours (0-11), and 6 LEDs on the bottom to represent the minutes (0-59). Each LED represents a zero or one.
Read more →There is a robot on an m x n grid. The robot is initially located at the top-left corner.
Read more →Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. Return the answer in any order.
Read more →Given an m x n binary matrix filled with 0's and 1's, find the largest square containing only 1's and return its area.
Read more →Suppose you have n integers labeled 1 through n. A permutation of those n integers.
Read more →Implement pow(x, n), which calculates x raised to the power n (i.e., xn).
Read more →Given a non-negative integer x, return the square root of x rounded down to the nearest intege.
Read more →Write a function to find the longest common prefix string amongst an array of strings.
Read more →You are given an array prices where prices[i] is the price of a given stock on the ith day.
Read more →Given an integer array nums, you need to find one continuous subarray such that if you only sort this subarray in non-decreasing order.
Read more →The encoding rule is: k[encoded_string], where the encoded_string inside the square brackets is being repeated exactly k
Read more →LeetCode Problem 1. Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.
Read more →Given two strings a and b, return the minimum number of times you should repeat string a so that string b is a substring of it.
Read more →Given a Tic-Tac-Toe board as a string array board, return true if and only if it is possible to reach
Read more →Given a string s which consists of lowercase or uppercase letters, return the length of the longest palindrome that can be built with those letters.
Read more →Given an m x n binary matrix mat, return the distance of the nearest 0 for each cell.
Read more →Given a string array words, return the maximum value of length(word[i]) * length(word[j])
Read more →Given a triangle array, return the minimum path sum from top to bottom
Read more →Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.
Read more →