huawei校招测试题
摘要:三道题两小时。第一题,圈住所有点的长方形,很简单略过。第二题:奇偶排序。奇偶排序描述:输入若干(不超过1000个)非负整数数字,请先取出为奇数的数字按从大到小排序,再取出偶数从小到大进行排序。运行时间限制:10 Sec内存限制:128 MByte输入:输入一串乱序的数字输出:输出排序后的数字样例输入...
阅读全文
LeetCode(27)题解:Remove Element
摘要:https://leetcode.com/problems/remove-element/ Given an array and a value, remove all instances of that value in place and return the new length. The o
阅读全文
LeetCode(26)题解:Remove Duplicates from Sorted Array
摘要:https://leetcode.com/problems/remove-duplicates-from-sorted-array/ Given a sorted array, remove the duplicates in place such that each element appear
阅读全文
LeetCode(21)题解:Merge Two Sorted Lists
摘要:https://leetcode.com/problems/merge-two-sorted-lists/ Merge two sorted linked lists and return it as a new list. The new list should be made by splici
阅读全文
word2vec学习 spark版
摘要:参考资料:http://ir.dlut.edu.cn/NewsShow.aspx?ID=291http://www.douban.com/note/298095260/http://machinelearning.wustl.edu/mlpapers/paper_files/BengioDVJ03....
阅读全文
Spark 学习笔记:(四)MLlib基础
摘要:MLlib:Machine Learning Library。主要内容包括:数据类型统计工具summary statisticscorrelationsstratified samplinghypothesis testingrandom data generation分类和回归线性模型(SVM,逻...
阅读全文
Spark 学习笔记:(三)Spark SQL
摘要:参考:https://spark.apache.org/docs/latest/sql-programming-guide.html#overview http://www.csdn.net/article/2015-04-03/2824407Spark SQL is a Spark module...
阅读全文
Spark 学习笔记:(二)编程指引(Scala版)
摘要:参考: http://spark.apache.org/docs/latest/programming-guide.html 后面懒得翻译了,英文记的,以后复习时再翻。摘要:每个Spark application包含一个driver program来运行main函数,在集群上进行各种并行操作...
阅读全文
git常用知识笔记
摘要:学习资料:http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000http://codingnow.cn/version/212.htmlhttp://blog.jobbole.com/345...
阅读全文
Spark学习笔记:(一)入门 glance
摘要:参考: http://spark.apache.org/docs/latest/quick-start.html其它资料: http://mojijs.com/2015/04/190845/index.htmlhttp://taoistwar.gitbooks.io/spark-developer...
阅读全文
scala进阶笔记:函数组合器(combinator)
摘要:collection基础参见之前的博文scala快速学习(二)。本文主要是组合器(combinator),因为在实际中发现很有用。主要参考:http://www.importnew.com/3673.htmlList(1,2,3) map squared会在列表的每个元素上分别应用squared函数...
阅读全文
scala快速学习笔记(三):Collections,包
摘要:VI.Collections1.Array一些常用方法:println, map( _ * 2),filter(_ % 2 == 0), sum, reserveArray是不可变的,可变的Array使用ArrayBuffer,需要先引入scala.collection.mutable包。例如,预...
阅读全文
scala快速学习笔记(二):控制结构,类和对象
摘要:IV.控制结构1.if/else除基本用法外,if/else语句能用来赋值,进而代替?:运算符。这得益于在Scala中,每个语句块都有值,就是该语句块最后一个语句的值。请看下面的代码。def abs(x: Int) = if(x //handle case 1 case "case 2...
阅读全文
scala快速学习笔记(一):变量函数,操作符,基本类型
摘要:为了用spark,先学下scala。参考教程:http://meetfp.com/zh/scala-basicdoc查询:http://docs.scala-lang.org其它资料:http://scalachina.com/node/16 http://blog.csdn.net/ma...
阅读全文
LeetCode题解(20)--Valid Parentheses
摘要:https://leetcode.com/problems/valid-parentheses/ 原题: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the i
阅读全文
LeetCode题解(19)--Remove Nth Node From End of List
摘要:https://leetcode.com/problems/remove-nth-node-from-end-of-list/ 原题: Given a linked list, remove the nth node from the end of list and return its head.
阅读全文
LeetCode题解(14)--Longest Common Prefix
摘要:https://leetcode.com/problems/longest-common-prefix/ 原题: Write a function to find the longest common prefix string amongst an array of strings. 思路: 简单
阅读全文
LeetCode题解(12)--Integer to Roman
摘要:https://leetcode.com/problems/integer-to-roman/ 原题: Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1
阅读全文
LeetCode题解(13)--Roman to Integer
摘要:https://leetcode.com/problems/roman-to-integer/ 原题: Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1
阅读全文