上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 36 下一页
摘要: Given two strings S and T, determine if they are both one edit distance apart.Analysis:Must be exactly one distance apart. Not the same.Solution: 1 pu... 阅读全文
posted @ 2014-12-15 05:25 LiBlog 阅读(373) 评论(0) 推荐(0) 编辑
摘要: The API: int read4(char *buf) reads 4 characters at a time from a file.The return value is the actual number of characters read. For example, it retur... 阅读全文
posted @ 2014-12-13 02:28 LiBlog 阅读(219) 评论(0) 推荐(0) 编辑
摘要: The API: int read4(char *buf) reads 4 characters at a time from a file.The return value is the actual number of characters read. For example, it retur... 阅读全文
posted @ 2014-12-13 02:04 LiBlog 阅读(207) 评论(0) 推荐(0) 编辑
摘要: Given a string, find the length of the longest substring T that contains at most 2 distinct characters.For example, Given s = “eceba”,T is "ece" which... 阅读全文
posted @ 2014-12-13 01:50 LiBlog 阅读(215) 评论(0) 推荐(0) 编辑
摘要: Given a sorted integer array where the range of elements are [lower, upper] inclusive, return its missing ranges. For example, given [0, 1, 3, 50, 75] 阅读全文
posted @ 2014-12-13 01:29 LiBlog 阅读(331) 评论(0) 推荐(0) 编辑
摘要: Given two words (start and end), and a dictionary, find all shortest transformation sequence(s) from start to end, such that:Only one letter can be ch... 阅读全文
posted @ 2014-12-12 05:48 LiBlog 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 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 longes... 阅读全文
posted @ 2014-12-12 04:31 LiBlog 阅读(125) 评论(0) 推荐(0) 编辑
摘要: Given a string s, partition s such that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioning ... 阅读全文
posted @ 2014-12-12 04:15 LiBlog 阅读(140) 评论(0) 推荐(0) 编辑
摘要: There are N children standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following req... 阅读全文
posted @ 2014-12-12 03:06 LiBlog 阅读(165) 评论(0) 推荐(0) 编辑
摘要: A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null.Return a deep copy ... 阅读全文
posted @ 2014-12-12 02:47 LiBlog 阅读(127) 评论(0) 推荐(0) 编辑
上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 36 下一页