摘要: 一、插入排序(InsertionSortList)单链表的插入排序,折腾了好久一会儿,好不容易做出来,在leetcode上仅仅击败百分之十几的人,而且代码啰嗦,参考了下别人代码,提交了下面的代码接近50% 1 /** 2 * Definition for singly-linked list. 3... 阅读全文
posted @ 2015-10-29 17:09 wxquare 阅读(180) 评论(0) 推荐(0) 编辑
摘要: Merge k Sorted ListsTotal Accepted:61378Total Submissions:285515Difficulty:HardMergeksorted linked lists and return it as one sorted list. Analyze and... 阅读全文
posted @ 2015-10-22 15:45 wxquare 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 使用二分法处理有序的数时非常有效的方法,能大大提高算法的效率。描述Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm’s runt... 阅读全文
posted @ 2015-10-19 20:28 wxquare 阅读(189) 评论(0) 推荐(0) 编辑
摘要: Hadoop集群_WordCount运行详解--MapReduce编程模型下面这篇文章写得非常好,有利于初学mapreduce的入门http://www.nosqldb.cn/1369099810935.html 阅读全文
posted @ 2015-10-18 15:36 wxquare 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 初学mapreduce,想在eclipse上配置mapreduce的环境,网上之类的教程,很多但是按照教程配之后,并不能正常运行。碰到下面的错误:15/10/17 20:10:39 INFO jvm.JvmMetrics: Initializing JVM Metrics with processN... 阅读全文
posted @ 2015-10-17 20:23 wxquare 阅读(486) 评论(0) 推荐(0) 编辑
摘要: /************************************************************STARTUP_MSG: Starting NameNodeSTARTUP_MSG: host = master/192.168.2.1STARTUP_MSG: args... 阅读全文
posted @ 2015-10-17 09:40 wxquare 阅读(581) 评论(0) 推荐(0) 编辑
摘要: 所谓的组合就是从给定一组数据中选取若干个组合在一起,没有顺序的差别,所以很容易通过递归(dfs)来实现。实例一(leetcode):Given two integersnandk, return all possible combinations ofknumbers out of 1 ...n.F... 阅读全文
posted @ 2015-10-16 10:15 wxquare 阅读(287) 评论(0) 推荐(0) 编辑
摘要: 1.大数据对分布式存储的需求 存储容量(>100PB) 高吞吐量(1PB sort < 2小时 350GB/每秒的吞吐量) 高可靠性(8个9) 服务高可靠性(99.95%时间可用) 运维简单 成本低,廉价pc服务器,数据压缩,混合存储。 2.大规模分布式存储系统的挑战 大规模分布式存储中小概率事件变 阅读全文
posted @ 2015-10-01 15:34 wxquare 阅读(5846) 评论(0) 推荐(0) 编辑
摘要: 问题描述:Given a collection of numbers, return all possible permutations.For example,[1,2,3]have the following permutations:[1,2,3],[1,3,2],[2,1,3],[2,3,1... 阅读全文
posted @ 2015-10-01 10:23 wxquare 阅读(430) 评论(0) 推荐(0) 编辑
摘要: 1.设计基础目标 (1) 错误是常态,需要使用数据冗余 (2)流式数据访问。数据批量读而不是随机速写,不支持OLTP,hadoop擅长数据分析而不是事物处理。 (3)文件采用一次性写多次读的模型,文件一旦写入就无法修改。所以一致性模型非常简单。 (4)程序采用 数据就近 原则分配节点执行。(... 阅读全文
posted @ 2015-09-30 16:22 wxquare 阅读(3559) 评论(0) 推荐(0) 编辑