上一页 1 2 3 4 5 6 7 8 9 10 ··· 31 下一页
摘要: 题目: Given n, how many structurally unique BST's (binary search trees) that store values 1...n? For example,Given n = 3, there are a total of 5 unique 阅读全文
posted @ 2017-06-06 01:24 panini 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 题目: Given n, generate all structurally unique BST's (binary search trees) that store values 1...n. For example,Given n = 3, your program should return 阅读全文
posted @ 2017-06-06 01:04 panini 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a string containing only digits, restore it by returning all possible valid IP address combinations. For example:Given "25525511135", return 阅读全文
posted @ 2017-06-05 10:56 panini 阅读(204) 评论(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 阅读全文
posted @ 2017-06-05 07:39 panini 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 题目: A message containing letters from A-Z is being encoded to numbers using the following mapping: Given an encoded message containing digits, determi 阅读全文
posted @ 2017-06-05 06:54 panini 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 题目: The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the total 阅读全文
posted @ 2017-06-05 01:09 panini 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve 阅读全文
posted @ 2017-06-04 23:45 panini 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. For example,Given  阅读全文
posted @ 2017-06-04 10:54 panini 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 题目: Follow up for "Remove Duplicates":What if duplicates are allowed at most twice? For example,Given sorted array nums = [1,1,1,2,2,3], Your function 阅读全文
posted @ 2017-06-01 06:11 panini 阅读(143) 评论(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 "a 阅读全文
posted @ 2017-05-31 02:58 panini 阅读(152) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 31 下一页