LeetCode 笔记26 Single Number II
摘要:Given an array of integers, every element appearsthreetimes except for one. Find that single one.Note:Your algorithm should have a linear runtime comp...
阅读全文
posted @
2015-02-27 21:29
lichen782
阅读(2005)
推荐(0)
LeetCode 笔记25 Candy (艰难的调试)
摘要:There areNchildren standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following requi...
阅读全文
posted @
2015-02-25 22:12
lichen782
阅读(359)
推荐(0)
LeetCode 笔记24 Palindrome Partitioning II (智商碾压)
摘要:Given a strings, partitionssuch that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioning ofs...
阅读全文
posted @
2015-02-24 13:06
lichen782
阅读(363)
推荐(0)
LeetCode 笔记23 Best Time to Buy and Sell Stock III
摘要:Best Time to Buy and Sell Stock IIISay you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the...
阅读全文
posted @
2015-02-18 10:24
lichen782
阅读(379)
推荐(0)
LeetCode 笔记22 Distinct Subsequences 动态规划需要冷静
摘要:Distinct SubsequencesGiven a stringSand a stringT, count the number of distinct subsequences ofTinS.A subsequence of a string is a new string which is...
阅读全文
posted @
2015-02-16 20:40
lichen782
阅读(473)
推荐(0)
LeetCode 笔记21 生成第k个排列
摘要:题目是这样的:The set[1,2,3,…,n]contains a total ofn! unique permutations.By listing and labeling all of the permutations in order,We get the following seque...
阅读全文
posted @
2015-02-01 10:38
lichen782
阅读(564)
推荐(0)