摘要: Given a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible palindrome partitioning ofs.For example, giv... 阅读全文
posted @ 2015-09-01 22:41 胡潇 阅读(777) 评论(0) 推荐(0) 编辑
摘要: A message containing letters fromA-Zis being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an encoded message conta... 阅读全文
posted @ 2015-09-01 17:15 胡潇 阅读(570) 评论(0) 推荐(0) 编辑
摘要: Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacent cell, where "adjace... 阅读全文
posted @ 2015-09-01 15:33 胡潇 阅读(794) 评论(0) 推荐(0) 编辑
摘要: Given amxnmatrix, if an element is 0, set its entire row and column to 0. Do it in place.解题思路:题目乍一看很简单,将矩阵当前为0的位的行列都置为0;问题在于:当遇到一个已知0时,不能立刻将其行列置0,因为这样... 阅读全文
posted @ 2015-09-01 14:59 胡潇 阅读(496) 评论(0) 推荐(0) 编辑