摘要: 题目描述: Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array. For example,Given nums = [ 阅读全文
posted @ 2016-03-06 20:35 scottwang 阅读(238) 评论(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 阅读全文
posted @ 2016-03-06 20:20 scottwang 阅读(445) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may 阅读全文
posted @ 2016-03-06 16:23 scottwang 阅读(158) 评论(0) 推荐(0) 编辑