摘要: Given a non-empty string containing an out-of-order English representation of digits 0-9, output the digits in ascending order. Note: Example 1: Examp 阅读全文
posted @ 2016-12-18 22:37 bonelee 阅读(412) 评论(0) 推荐(0) 编辑
摘要: Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. Note: You may assume k is always valid, 1 ≤ k ≤ BST's 阅读全文
posted @ 2016-12-18 20:58 bonelee 阅读(163) 评论(0) 推荐(0) 编辑
摘要: There are a number of spherical balloons spread in two-dimensional space. For each balloon, provided input is the start and end coordinates of the hor 阅读全文
posted @ 2016-12-18 20:01 bonelee 阅读(311) 评论(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-18 18:14 bonelee 阅读(242) 评论(0) 推荐(0) 编辑
摘要: Given a set of intervals, for each of the interval i, check if there exists an interval j whose start point is bigger than or equal to the end point o 阅读全文
posted @ 2016-12-18 17:08 bonelee 阅读(301) 评论(0) 推荐(0) 编辑