摘要: `Array Hash Table` Description: Given an array of integers and an integer k , find out whether there are two distinct indices i and j in the array suc 阅读全文
posted @ 2017-07-20 11:46 6002 阅读(107) 评论(0) 推荐(0) 编辑
摘要: `Array Hash Table` Description: Given an array of integers, find if the array contains any duplicates. Your function should return true if any value a 阅读全文
posted @ 2017-07-19 11:09 6002 阅读(104) 评论(0) 推荐(0) 编辑
摘要: `Array` Description: Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array is rotated to . 刷题还是习惯早上刷,现在脑 阅读全文
posted @ 2017-07-18 17:34 6002 阅读(78) 评论(0) 推荐(0) 编辑
摘要: `Array Divide and Conquer Bit Manipulation` Description: Given an array of size n, find the majority element. The majority element is the element that 阅读全文
posted @ 2017-07-17 10:50 6002 阅读(155) 评论(0) 推荐(0) 编辑
摘要: `Array Two Pointers Binary Search` Description: Given an array of integers that is already sorted in ascending order , find two numbers such that they 阅读全文
posted @ 2017-07-16 13:25 6002 阅读(122) 评论(0) 推荐(0) 编辑
摘要: Description: 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. Y 阅读全文
posted @ 2017-07-15 21:39 6002 阅读(117) 评论(0) 推荐(0) 编辑
摘要: `Array DP` Description: Say you have an array for which the i th element is the price of a given stock on day i . If you were only permitted to comple 阅读全文
posted @ 2017-07-15 11:32 6002 阅读(177) 评论(0) 推荐(0) 编辑
摘要: MapReduce工作机制——Word Count实例(一) MapReduce的思想是分布式计算,也就是分而治之,并行计算提高速度。 编程思想 首先,要将数据抽象为键值对的形式,map函数输入键值对,处理后,产生新的键值对作为中间结果输出。接着,MapReduce框架自动将中间结果按键做聚合处理, 阅读全文
posted @ 2017-07-14 17:56 6002 阅读(490) 评论(0) 推荐(0) 编辑
摘要: Description: Given an index k , return the k th row of the Pascal's triangle. For example, given k = 3, Return . my Solution: java public class Soluti 阅读全文
posted @ 2017-07-14 15:27 6002 阅读(111) 评论(0) 推荐(0) 编辑
摘要: `Array` Description: Given numRows , generate the first numRows of Pascal's triangle. For example, given numRows = 5, Return 这题依旧没写出来,看到要返回的是 直接就蒙了。感想 阅读全文
posted @ 2017-07-14 13:31 6002 阅读(99) 评论(0) 推荐(0) 编辑