2014年12月3日

Valid Palindrome

摘要: Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Pana... 阅读全文

posted @ 2014-12-03 17:50 code#swan 阅读(99) 评论(0) 推荐(0)

Word Ladder

摘要: Given two words (startandend), and a dictionary, find the length of shortest transformation sequence fromstarttoend, such that:Only one letter can be ... 阅读全文

posted @ 2014-12-03 17:49 code#swan 阅读(133) 评论(0) 推荐(0)

Longest Consecutive Sequence

摘要: Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given[100, 4, 200, 1, 3, 2],The longest ... 阅读全文

posted @ 2014-12-03 17:47 code#swan 阅读(98) 评论(0) 推荐(0)

Sum Root to Leaf Numbers

摘要: Given a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-leaf path1->2->3which rep... 阅读全文

posted @ 2014-12-03 17:46 code#swan 阅读(111) 评论(0) 推荐(0)

Surrounded Regions

摘要: Given a 2D board containing'X'and'O', capture all regions surrounded by'X'.A region is captured by flipping all'O's into'X's in that surrounded region... 阅读全文

posted @ 2014-12-03 12:14 code#swan 阅读(102) 评论(0) 推荐(0)

Palindrome Partitioning

摘要: Given a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible palindrome partitioning ofs.For example, giv... 阅读全文

posted @ 2014-12-03 12:13 code#swan 阅读(94) 评论(0) 推荐(0)

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 @ 2014-12-03 12:12 code#swan 阅读(113) 评论(0) 推荐(0)

Clone Graph

摘要: Clone an undirected graph. Each node in the graph contains alabeland a list of itsneighbors.OJ's undirected graph serialization:Nodes are labeled uniq... 阅读全文

posted @ 2014-12-03 12:10 code#swan 阅读(82) 评论(0) 推荐(0)

Gas Station

摘要: There areNgas stations along a circular route, where the amount of gas at stationiisgas[i].You have a car with an unlimited gas tank and it costscost[... 阅读全文

posted @ 2014-12-03 12:07 code#swan 阅读(113) 评论(0) 推荐(0)

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 @ 2014-12-03 12:06 code#swan 阅读(86) 评论(0) 推荐(0)

导航