摘要:
Given two strings s and t which consist of only lowercase letters. String t is generated by random shuffling string s and then add one more letter at 阅读全文
posted @ 2016-10-11 16:00
Machelsky
阅读(185)
评论(0)
推荐(0)
摘要:
Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST. Calling next() will return the n 阅读全文
posted @ 2016-10-11 15:50
Machelsky
阅读(98)
评论(0)
推荐(0)
摘要:
Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The left subtree of a node contains only 阅读全文
posted @ 2016-10-11 15:22
Machelsky
阅读(140)
评论(0)
推荐(0)
摘要:
Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. If the last word 阅读全文
posted @ 2016-10-11 14:53
Machelsky
阅读(115)
评论(0)
推荐(0)
摘要:
Remove all elements from a linked list of integers that have value val. ExampleGiven: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6, val = 6Return: 1 --> 2 -- 阅读全文
posted @ 2016-10-11 13:18
Machelsky
阅读(83)
评论(0)
推荐(0)
摘要:
66. Plus One: 只需考虑数字是不是9即可,不是9,直接加1输出,是9,就继续检查更新。如果结束循环还不输出,就是全9情况,建新array输出第一位为1. 阅读全文
posted @ 2016-10-11 12:03
Machelsky
阅读(71)
评论(0)
推荐(0)
摘要:
1. HashMap 和 HashTable 转:http://www.cnblogs.com/devinzhang/archive/2012/01/13/2321481.html 阅读全文
posted @ 2016-10-11 08:24
Machelsky
阅读(93)
评论(0)
推荐(0)