摘要: Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be segmented into a space-separated sequ 阅读全文
posted @ 2018-03-05 15:05 轻风舞动 阅读(1356) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, add spaces in s to construct a sentence where each word is 阅读全文
posted @ 2018-03-05 15:04 轻风舞动 阅读(2240) 评论(0) 推荐(0) 编辑
摘要: Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or 阅读全文
posted @ 2018-03-05 14:04 轻风舞动 阅读(997) 评论(0) 推荐(0) 编辑
摘要: Reverse a singly linked list. Hint: A linked list can be reversed either iteratively or recursively. Could you implement both? 反向链表,分别用递归和迭代方式实现。 递归It 阅读全文
posted @ 2018-03-05 07:23 轻风舞动 阅读(1278) 评论(0) 推荐(0) 编辑
摘要: Reverse a linked list from position m to n. Do it in-place and in one-pass. For example:Given 1->2->3->4->5->NULL, m = 2 and n = 4, return 1->4->3->2- 阅读全文
posted @ 2018-03-05 07:22 轻风舞动 阅读(425) 评论(0) 推荐(0) 编辑
摘要: Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is like: 阅读全文
posted @ 2018-03-05 06:20 轻风舞动 阅读(195) 评论(0) 推荐(0) 编辑