- 博客(6)
- 收藏
- 关注
原创 leetcode:Palindromic Substrings
Given a string, your task is to count how many palindromic substrings in this string.The substrings with different start indexes or end indexes are counted as different substrings even they consist ...
2018-08-13 07:31:30 172
原创 leetcode 279. Perfect Squares
Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n.Example 1:Input: n = 12Output: 3 Explanation: 12 = 4 + 4 + 4.Example...
2018-08-12 18:51:27 172
原创 leetcode: 115. Distinct Subsequences
Given a string S and a string T, count the number of distinct subsequences of S which equals T.A subsequence of a string is a new string which is formed from the original string by deleting some (ca...
2018-08-12 08:05:12 165
原创 leetcode:813. Largest Sum of Averages(DP)
We partition a row of numbers A into at most K adjacent (non-empty) groups, then our score is the sum of the average of each group. What is the largest score we can achieve?Note that our partition m...
2018-08-11 14:58:37 201
原创 leetcode 129. Sum Root to Leaf Numbers
Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.An example is the root-to-leaf path 1->2->3 which represents the number 123.Find the tota...
2018-08-08 00:18:48 169
原创 [leetcode] 116 Populating Next Right Pointers in Each Node
iven a binary treestruct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next;}Populate each next pointer to point to its next right node. If there is no next right ...
2018-08-07 23:49:39 168
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人