摘要: Given a root node reference of a BST and a key, delete the node with the given key in the BST. Return the root node reference (possibly updated) of th 阅读全文
posted @ 2016-12-05 11:51 微微程序媛 阅读(199) 评论(0) 推荐(0) 编辑
摘要: An abbreviation of a word follows the form <first letter><number><last letter>. Below are some examples of word abbreviations: Assume you have a dicti 阅读全文
posted @ 2016-12-05 11:40 微微程序媛 阅读(269) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty string s and an abbreviation abbr, return whether the string matches with the given abbreviation. A string such as "word" contains o 阅读全文
posted @ 2016-12-05 10:57 微微程序媛 阅读(181) 评论(0) 推荐(0) 编辑
摘要: Given two integers representing the numerator and denominator of a fraction, return the fraction in string format. If the fractional part is repeating 阅读全文
posted @ 2016-12-05 10:17 微微程序媛 阅读(115) 评论(0) 推荐(0) 编辑
摘要: Given a complete binary tree, count the number of nodes. Definition of a complete binary tree from Wikipedia:In a complete binary tree every level, ex 阅读全文
posted @ 2016-12-05 09:36 微微程序媛 阅读(90) 评论(0) 推荐(0) 编辑
摘要: Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules. The Sudoku board could be partially filled, where empty cells are filled wit 阅读全文
posted @ 2016-12-05 08:06 微微程序媛 阅读(104) 评论(0) 推荐(0) 编辑
摘要: There are n bulbs that are initially off. You first turn on all the bulbs. Then, you turn off every second bulb. On the third round, you toggle every 阅读全文
posted @ 2016-12-05 07:35 微微程序媛 阅读(206) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, find out whether there are two distinct indices i and j in the array such that the difference between nums[i] and nums[j]  阅读全文
posted @ 2016-12-05 07:18 微微程序媛 阅读(134) 评论(0) 推荐(0) 编辑
摘要: Given a string which contains only lowercase letters, remove duplicate letters so that every letter appear once and only once. You must make sure your 阅读全文
posted @ 2016-12-05 06:40 微微程序媛 阅读(192) 评论(0) 推荐(0) 编辑
摘要: Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two 阅读全文
posted @ 2016-12-05 05:10 微微程序媛 阅读(194) 评论(0) 推荐(0) 编辑