自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(148)
  • 资源 (6)
  • 收藏
  • 关注

翻译 对象相等性——如何给自定义对象添加equals和hashCode方法

欢迎使用Markdown编辑器写博客本Markdown编辑器使用StackEdit修改而来,用它写博客,将会带来全新的体验哦:Markdown和扩展Markdown简洁的语法代码块高亮图片链接和图片上传LaTex数学公式UML序列图和流程图离线写博客导入导出Markdown文件丰富的快捷键快捷键加粗 Ctrl + B 斜体 Ctrl + I 引用 Ctrl

2016-06-29 13:26:36 2214

原创 【LeetCode】Serialize and Deserialize Binary Tree 解题报告

【题目】Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or transmitted across a network connection

2015-10-28 21:38:33 12595

原创 【LeetCode】Simplify Path 解题报告

【题目】Given an absolute path for a file (Unix-style), simplify it.For example,path = "/home/", => "/home"path = "/a/./b/../../c/", => "/c"click to show corner cases.Corner Case

2015-09-10 21:09:13 2267

原创 【hihoCoder】Tower Defense Game

【题目】微软FY16 Top Candidates 在线笔试http://hihocoder.com/contest/mstest2015sept1/problem/3由于比赛已过,也不知道下面代码对不对,欢迎讨论。【代码】import java.util.ArrayList;import java.util.HashMap;import java.util

2015-09-10 19:39:18 1363

原创 【hihoCoder】 #1040 : 矩形判断

【题目】描述给出平面上4条线段,判断这4条线段是否恰好围成一个面积大于0的矩形。输入输入第一行是一个整数T(1每组数据包含4行,每行包含4个整数x1, y1, x2, y2 (0 输出每组数据输出一行YES或者NO,表示输入的4条线段是否恰好围成矩形。【解析】第一步,判断四条线段的八个顶点是否两两重合为矩形的四个顶点;第二

2015-09-09 14:39:44 1691 1

原创 【LeetCode】House Robber I & II 解题报告

【题目】IYou are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that a

2015-07-19 21:13:15 4383

原创 VM tools安装错误The path "" is not a valid path to the xx generic kernel headers.

在网上搜索很多解决方案,并不适用于我的问题,最后通过以下步骤解决:1. 更新软件源(防止build-essential不能 安装),然后安装build-essential和linu-headers-$(uname -r)(其中$(uname -r)是你的Linux内核版本号)sudo apt-get updatesudo apt-get install build-essential l

2015-06-23 09:49:02 5613 1

原创 【LeetCode】Basic Calculator 解题报告

【题目】Implement a basic calculator to evaluate a simple expression string.The expression string may contain open ( and closing parentheses ), the plus + or minus sign -, non-negative integer

2015-06-14 11:19:17 9014

原创 【LeetCode】Implement Stack using Queues 解题报告

【题目】Implement the following operations of a stack using queues.push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top() -- Get the top element.empty() -- R

2015-06-14 10:35:53 9947 1

原创 【LeetCode】Course Schedule II 解题报告

【题目】There are a total of n courses you have to take, labeled from 0 to n - 1.Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is exp

2015-05-19 17:13:08 9419

原创 【LeetCode】Course Schedule 解题报告

【题目】There are a total of n courses you have to take, labeled from 0 to n - 1.Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is exp

2015-05-19 17:05:08 17574

原创 【LeetCode】Word Search II 解题报告

【题目】Given a 2D board and a list of words from the dictionary, find all words in the board.Each word must be constructed from letters of sequentially adjacent cell, where "adjacent" cells are

2015-05-19 16:52:33 15938

原创 【LeetCode】Word Search 解题报告

【题目】Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizontally or

2015-05-19 16:39:22 4590

原创 【hihoCoder 1139】 二分·二分答案

时间限制:10000ms单点时限:1000ms内存限制:256MB描述在上一回和上上回里我们知道Nettle在玩《艦これ》,Nettle在整理好舰队之后终于准备出海捞船和敌军交战了。在这个游戏里面,海域是N个战略点(编号1..N)组成,如下图所示其中红色的点表示有敌人驻扎,猫头像的的点表示该地图敌军主力舰队(boss)的驻扎点,虚线表示各个战略点

2015-04-20 16:46:49 1612 1

原创 【hihoCoder】基站选址

时间限制:2000ms单点时限:1000ms内存限制:256MB描述需要在一个N × M的网格中建立一个通讯基站,通讯基站仅必须建立在格点上。网格中有A个用户,每个用户的通讯代价是用户到基站欧几里得距离的平方。网格中还有B个通讯公司,维护基站的代价是基站到最近的一个通讯公司的路程(路程定义为曼哈顿距离)。在网格中建立基站的总代价是用户通讯代价的总

2015-04-19 10:56:56 2333

原创 【hihoCoder】回文字符序列

描述给定字符串,求它的回文子序列个数。回文子序列反转字符顺序后仍然与原序列相同。例如字符串aba中,回文子序列为"a", "a", "aa", "b", "aba",共5个。内容相同位置不同的子序列算不同的子序列。输入第一行一个整数T,表示数据组数。之后是T组数据,每组数据为一行字符串。输出对于每组数据输出一行,格式为"Case #X: Y",X代表数据编号(从1开始)

2015-04-19 10:43:20 4734 2

原创 【LeetCode】Valid Number 解题报告

【题目】Validate if a given string is numeric.Some examples:"0" => true" 0.1 " => true"abc" => false"1 a" => false"2e10" => trueNote: It is intended for the problem statement to

2015-04-10 15:29:05 1867 1

原创 【LeetCode】Text Justification 解题报告

【题目】Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified.You should pack your words in a greedy approa

2015-04-10 11:26:22 5685 1

原创 【LeetCode】Number of Islands 解题报告

【题目】Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. Yo

2015-04-10 10:16:24 19642 2

原创 【LeetCode】 Permutations 排列生成算法之字典序法

字典序排序生成算法字典序法就是按照字典排序的思想逐一产生所有排列。例如,由1,2,3,4组成的所有排列,从小到大的依次为:1234, 1243, 1324, 1342, 1423, 1432, 2134, 2143, 2314, 2341, 2413, 2431, 3124, 3142, 3214, 3241, 3412, 3421, 4123, 4132,

2015-04-08 17:31:21 5661 1

原创 【LeetCode】Insert Interval 解题报告

【题目】Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals were initially sorted according to their start t

2015-04-07 17:28:16 2751

原创 【LeetCode】Merge Intervals 解题报告

【题目】Given a collection of intervals, merge all overlapping intervals.For example,Given [1,3],[2,6],[8,10],[15,18],return [1,6],[8,10],[15,18].【解析】题意:有很多个区间,把有重叠的区间合并。思路:先排序,然后检查相邻两

2015-04-06 20:32:50 5850

原创 【LeetCode】Longest Valid Parentheses 解题报告

【题目】Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.For "(()", the longest valid parentheses substring i

2015-04-06 19:05:15 2243 1

原创 【LeetCode】Simplify Path 解题报告

【题目】Given an absolute path for a file (Unix-style), simplify it.For example,path = "/home/", => "/home"path = "/a/./b/../../c/", => "/c"click to show corner cases.Corner Cases:

2015-04-06 11:37:37 2779

原创 【LeetCode】 Best Time to Buy and Sell Stock I II III IV 解题报告

Best Time to Buy and Sell Stock I题意:用一个数组表示股票每天的价格,数组的第i个数表示股票在第i天的价格。 如果只允许进行一次交易,也就是说只允许买一支股票并卖掉,求最大的收益。分析:动态规划法。从前向后遍历数组,记录当前出现过的最低价格,作为买入价格,并计算以当天价格出售的收益,作为可能的最大收益,整个遍历过程中,出现过的最大收益就是所求。**代码:**O(n)时

2015-04-06 11:10:34 24826 1

原创 【LeetCode】Binary Tree Right Side View 解题报告

【题目】Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.For example:Given the following binary tre

2015-04-06 10:33:34 9081

转载 大公司最喜欢问的Java集合类面试题

看了一些所谓大公司的JAVA面试问题,发现对于JAVA集合类的使用都比较看重似的,而自己在这方面还真的是所真甚少,抽空也学习学习吧。java.util包中包含了一系列重要的集合类,而对于集合类,主要需要掌握的就是它的内部结构,以及遍历集合的迭代模式。接口:CollectionCollection是最基本的集合接口,一个Collection代表一组Object,即Collec

2015-04-02 17:38:43 2476 1

转载 苹果面试8大难题及答案

转自 http://www.csdn.net/article/2012-06-18/2806684-apple-interview-questions-and-answers摘要:苹果这样的公司通常会在面试过程中向求职者抛出一些逻辑的问题来考研面试者,所以,如果你对进入苹果感兴趣,或者向往类似的公司,又或者只是对逻辑问题感兴趣,这些面试难题值得你仔细研究。导读:苹果

2015-04-02 16:43:52 795

原创 【LeetCode】Search in Rotated Sorted Array II 解题报告

【题目】Follow up for "Search in Rotated Sorted Array":What if duplicates are allowed?Would this affect the run-time complexity? How and why?Write a function to determine if a given target

2015-04-02 15:00:36 1048

原创 【hiho39】二分·归并排序之逆序对

最近申请了微软的暑假实习,4号就要在线笔试了,在线测试系统用的是http://hihocoder.com/,今天试手做了一道题。【题目】原题链接:http://hihocoder.com/contest/hiho39/problem/1 输入第1行:1个整数N,表示数组长度。第2行:N个整数,表示数组的元素a[i],1≤a[i]≤2^31-1。输出第1行

2015-04-02 00:32:44 1817

原创 【LeetCode】Scramble String 解题报告

【题目】Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representation of s1 = "great": great /

2015-03-22 15:16:18 5512

原创 【LeetCode】Interleaving String 解题报告

【题目】Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2.For example,Given:s1 = "aabcc",s2 = "dbbca",When s3 = "aadbbcbcac", return true.When s3 = "aadbbb

2015-03-21 18:50:13 3893 1

原创 【LeetCode】Recover Binary Search Tree 解题报告

【题目】Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(n) space is pretty straight forward. Could

2015-03-21 11:58:37 3203 1

原创 【LeetCode】Repeated DNA Sequences 解题报告

【题目】All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA, it is sometimes useful to identify repeated sequences within the D

2015-03-20 11:19:21 6205 7

原创 【LeetCode】Binary Tree Maximum Path Sum 解题报告

【题目】Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1 / \ 2 3Re

2015-01-22 16:15:05 4748

原创 【LeetCode】Largest Number 解题报告

【题目】Given a list of non negative integers, arrange them such that they form the largest number.For example, given [3, 30, 34, 5, 9], the largest formed number is 9534330.Note: The result

2015-01-13 15:04:39 12592 13

原创 【LeetCode】Dungeon Game 解题报告【Solution】

【题目】The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of M x N rooms laid out in a 2D grid. Our valiant knight (K) was i

2015-01-11 21:41:08 9561

原创 【LeetCode】Longest Consecutive Sequence 解题报告

【题目】Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given [100, 4, 200, 1, 3, 2],The longest consecutive elements sequence i

2015-01-04 21:51:28 1226

原创 【LeetCode】Substring with Concatenation of All Words 解题报告

【题目】You are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenation of each word in L exactly once an

2014-12-29 15:45:19 8782 6

原创 【LeetCode】First Missing Positive 解题报告

【题目】Given an unsorted integer array, find the first missing positive integer.For example,Given [1,2,0] return 3,and [3,4,-1,1] return 2.Your algorithm should run in O(n) time and use

2014-12-28 21:00:14 5190

Correlating Events with Time Series for Incident Diagnosis(中文版)

2014 KDD论文“Correlating Events with Time Series for Incident Diagnosis”的学习与讲解。

2015-09-22

t 检验

学习2014 KDD论文“Correlating Events with Time Series for Incident Diagnosis”时查阅的资料。

2015-09-22

Autocorrelation

根据”http://www.ltrr.arizona.edu/~dmeko/notes_3.pdf“总结的一个关于时间序列自相关的PPT,供大家学习交流!

2015-09-22

RSA公私钥生成及加解密文件工具

这是一个RSA加密解密软件,可以指定大素数P和Q的位数,生成RSA公钥和私钥。还可以用用来对字符型文本进行加解密。

2014-01-18

编译原理实验 词法分析器 C++程序源码

编译原理实验 词法分析器 C++程序源码 全部为个人所写 复制粘贴即可运行

2011-04-28

如何建立链表及链表的前后插入法,求源代码?

本资源包含链表建立的代码(C语言),包括前插法,后插法,排序等。

2010-06-11

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除