Best Time to Buy and Sell Stock with Cooldown
You are given an array prices where prices[i] is the price of a given stock on the ith day.
You are given an array prices where prices[i] is the price of a given stock on the ith day.
You are climbing a staircase. It takes n steps to reach the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?
You are given an integer array coins representing coins of different denominations and an integer amount representing a total amount of money.
Given an array of distinct integers nums and a target integer target, return the number of possible combinations that add up to target.
Given a string s, return the sum of countUniqueChars(t) where t is a substring of s. The test cases are generated such that the answer fits in a 32-bit integer.
Given an integer n, return an array ans of length n + 1 such that for each i (0 <= i <= n), ans[i] is the number of 1's in the binary representation of i.
Given a string s containing only digits, return the number of ways to decode it.
Given an integer array nums representing the amount of money of each house, return *the maximum amount of money you can rob tonight without alerting the police.
You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed. All houses at this place are arranged in a circle.
You are given an integer array nums. You are initially positioned at the array's first index, and each element in the array represents your maximum jump length at that position.
Given an integer array nums, return the length of the longest strictly increasing subsequence.
Given a string s, return the longest palindromic substring in s.
Given a string containing just the characters '(' and ')', return the length of the longest valid (well-formed) parentheses substring.
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.
Given an integer array nums, find a subarray that has the largest product, and return the product.
You're given the startTime, endTime and profit arrays, return the maximum profit you can take such that there are no two jobs in the subset with overlapping time range.
Given an integer array nums, find the subarray which has the largest sum and return its sum.
Given an integer array nums, return the number of longest increasing subsequences.
Given a string s, return the number of palindromic substrings in it.
Given a non-empty array nums containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both subsets is equal.
Given an integer array nums and an integer k, return true if it is possible to divide this array into k non-empty subsets whose sums are all equal.
Calculate the sum of the elements of nums between indices left and right inclusive where left <= right.
You want to build an expression out of nums by adding one of the symbols '+' and '-' before each integer in nums and then concatenate all the integers.
There is a robot on an m x n grid. The robot is initially located at the top-left corner (i.e., grid[0][0])...
Given a string s and a dictionary of strings wordDict, return true if s can be segmented into a space-separated sequence of one or more dictionary words.