题目Given a string S and a string T, count the number of distinct subsequences of Swhich equals T.
A subsequence of a string is a new string which is fo
...
题目Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.
For example, given the
...
题目Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2.
Example 1:
Input: s1 = "aabcc", s2 = "dbbca", s3 = "aadbbcbcac"
Outp
...
题目Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.
Below is one possible represent
...
题目A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below).The robot can only move either down or right at any
...
题目Given two words word1 and word2, find the minimum number of operations required to convert word1 to word2.
You have the following 3 operations permi
...
题目Given an array of non-negative integers, you are initially positioned at the first index of the array.
Each element in the array represents your max
...
题目Given a sorted positive integer array nums and an integer n, add/patch elements to the array such that any number in range [1, n] inclusive can be f
...