摘要:
Given a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible palindrome partitioning ofs.For example, giv... 阅读全文
摘要:
A message containing letters fromA-Zis being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an encoded message conta... 阅读全文
摘要:
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... 阅读全文
摘要:
Given amxnmatrix, if an element is 0, set its entire row and column to 0. Do it in place.解题思路:题目乍一看很简单,将矩阵当前为0的位的行列都置为0;问题在于:当遇到一个已知0时,不能立刻将其行列置0,因为这样... 阅读全文
摘要:
Validate if a given string is numeric.Some examples:"0"=>true" 0.1 "=>true"abc"=>false"1 a"=>false"2e10"=>trueNote:It is intended for the problem stat... 阅读全文
摘要:
Given a set ofnon-overlappingintervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals were initially... 阅读全文
摘要:
Given a collection of intervals, merge all overlapping intervals.For example,Given[1,3],[2,6],[8,10],[15,18],return[1,6],[8,10],[15,18].解题思路:1、将区间按照起始... 阅读全文
摘要:
Given an array of strings, group anagrams together.For example, given:["eat", "tea", "tan", "ate", "nat", "bat"],Return:[ ["ate", "eat","tea"], ["na... 阅读全文
摘要:
Mergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity.解题思路:1、先取出k个list的首元素,每个首元素是对应list中的最小元素,组成一个具有k个结点的最小堆... 阅读全文