Given a string s, find the longest palindromic subsequence's length in s. You may assume that the maximum length of s is 1000. Example 1:Input: Output ...
分类:
其他好文 时间:
2019-02-11 12:26:57
阅读次数:
172
We are playing the Guess Game. The game is as follows: I pick a number from 1 to n. You have to guess which number I picked. Every time you guess wron ...
分类:
其他好文 时间:
2019-02-11 12:13:55
阅读次数:
167
Given an array A of positive integers, call a (contiguous, not necessarily distinct) subarray of A good if the number of different integers in that su ...
分类:
其他好文 时间:
2019-02-10 23:33:31
阅读次数:
293
Given an array equations of strings that represent relationships between variables, each string equations[i] has length 4 and takes one of two differe ...
分类:
其他好文 时间:
2019-02-10 20:31:42
阅读次数:
135
Given a sequence of n integers a1, a2, ..., an, a 132 pattern is a subsequence ai, aj, ak such that i < j < k and ai < ak < aj. Design an algorithm th ...
分类:
其他好文 时间:
2019-02-08 10:34:26
阅读次数:
202
Given a root node reference of a BST and a key, delete the node with the given key in the BST. Return the root node reference (possibly updated) of th ...
分类:
其他好文 时间:
2019-02-07 09:21:07
阅读次数:
157
Given a string representing an expression of fraction addition and subtraction, you need to return the calculation result in string format. The final ...
分类:
其他好文 时间:
2019-02-07 09:19:27
阅读次数:
171
Given an array of scores that are non-negative integers. Player 1 picks one of the numbers from either end of the array followed by the player 2 and t ...
We have an array A of non-negative integers. For every (contiguous) subarray B = [A[i], A[i+1], ..., A[j]] (with i <= j), we take the bitwise OR of al ...
分类:
其他好文 时间:
2019-02-05 14:20:04
阅读次数:
174
Given two integers A and B, return any string S such that: S has length A + B and contains exactly A 'a' letters, and exactly B 'b' letters; The subst ...
分类:
其他好文 时间:
2019-02-05 13:05:51
阅读次数:
165