2014年8月25日
摘要: 题目:定义一个函数,输入一个链表的头结点,反转该链表并输出反正后链表的头结点。#include#includetypedef struct node{ int Element; struct node *Link;}Node;Node *ReverseList(Node *first){... 阅读全文
posted @ 2014-08-25 15:29 月下美妞1314 阅读(148) 评论(0) 推荐(0) 编辑
  2014年8月5日
摘要: 题目:输入一个链表,输出该链表中倒数第K个节点。为了符合大多数人的习惯,本题从1开始计数,即链表的尾节点是倒数第1个结点。package com.edu;class LinkNode{ //定义一个结点类型 int val; ... 阅读全文
posted @ 2014-08-05 16:23 月下美妞1314 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 题目:输入数字n,按顺序打印出从1到最大的n位十进制数。比如,输入3,则打印出1,2,3,.....,一直到最大的3位数即999。分析:1、这是一个典型的大数加法问题,无论是int还是long long类型多无法表示。所以在解决大数问题时,通常是使用字符串或者数组实现其功能(由于个人比较钟爱数组,所... 阅读全文
posted @ 2014-08-05 13:49 月下美妞1314 阅读(3961) 评论(0) 推荐(0) 编辑
  2014年7月8日
摘要: 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],[3,... 阅读全文
posted @ 2014-07-08 23:44 月下美妞1314 阅读(404) 评论(0) 推荐(0) 编辑
摘要: Givennpairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, givenn= 3, a solution set is:"((()))... 阅读全文
posted @ 2014-07-08 23:22 月下美妞1314 阅读(311) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return thelevel ordertraversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree{3,9,2... 阅读全文
posted @ 2014-07-08 22:53 月下美妞1314 阅读(197) 评论(0) 推荐(0) 编辑
  2014年5月16日
摘要: 遇到的问题:当点击上面的logs时,会出现下面问题:这个解决方案为:By default, Hadoop stores the logs of each container in the node where that container was hosted. While this is irre... 阅读全文
posted @ 2014-05-16 11:11 月下美妞1314 阅读(580) 评论(0) 推荐(0) 编辑
  2014年5月9日
摘要: Pig是一个客户端应用程序,就算你要在Hadoop集群上运行Pig,也不需要在集群上装额外的东西。Pig的配置非常简单:1、下载pig,网址http://pig.apache.org/2、在机器上安装完成hadoop和jdk等。3、修改配置文件(.profile)export JAVA_HOME=/... 阅读全文
posted @ 2014-05-09 22:37 月下美妞1314 阅读(449) 评论(0) 推荐(0) 编辑
  2014年5月4日
摘要: 一、安装的需要软件及集群描述1、软件:Vmware9.0:虚拟机Hadoop2.2.0:Apache官网原版稳定版本JDK1.7.0_07:Oracle官网版本Ubuntu12.04LTS:长期支持版本Ganglia:集群性能监测软件ssh:SSH 为 Secure Shell 的缩写,由 IETF... 阅读全文
posted @ 2014-05-04 18:49 月下美妞1314 阅读(452) 评论(0) 推荐(0) 编辑
  2014年5月2日
摘要: 一、Partitioner介绍Partitioner的作用是对Mapper产生的中间结果进行分片,以便将同一分组的数据交给同一个Reduce处理,它直接影响Reduce阶段的负载均衡(个人理解:就是按照Reduce的个数,将Mapper产生的中间结果按照关键字送给不同的Reduce,Reduce对相... 阅读全文
posted @ 2014-05-02 21:10 月下美妞1314 阅读(365) 评论(0) 推荐(0) 编辑