摘要: Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements. Example: 阅读全文
posted @ 2018-11-16 16:05 zebinLin 阅读(97) 评论(0) 推荐(0) 编辑
摘要: Manacher算法 在介绍算法之前,首先介绍一下什么是回文串,所谓回文串,简单来说就是正着读和反着读都是一样的字符串,比如abba,noon等等,一个字符串的最长回文子串即为这个字符串的子串中,是回文串的最长的那个。 计算字符串的最长回文字串最简单的算法就是枚举该字符串的每一个子串,并且判断这个子 阅读全文
posted @ 2018-11-09 10:40 zebinLin 阅读(181) 评论(0) 推荐(0) 编辑
摘要: The thief has found himself a new place for his thievery again. There is only one entrance to this area, called the "root." Besides the root, each hou 阅读全文
posted @ 2018-10-18 11:04 zebinLin 阅读(228) 评论(0) 推荐(0) 编辑
摘要: 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 ar 阅读全文
posted @ 2018-10-17 14:29 zebinLin 阅读(134) 评论(0) 推荐(0) 编辑
摘要: You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping yo 阅读全文
posted @ 2018-10-17 11:01 zebinLin 阅读(142) 评论(0) 推荐(0) 编辑
摘要: Suppose you have a random list of people standing in a queue. Each person is described by a pair of integers(h, k), where h is the height of the perso 阅读全文
posted @ 2018-10-16 22:19 zebinLin 阅读(115) 评论(0) 推荐(0) 编辑