自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

ForLearning

A man in the road!

  • 博客(194)
  • 资源 (3)
  • 收藏
  • 关注

原创 Swap Nodes in Pairs

Given a linked list, swap every two adjacent nodes and return its head.For example,Given 1->2->3->4, you should return the list as 2->1->4->3.Your algorithm should use only constant space. You m

2014-05-23 19:59:32 1406

原创 Remove Nth Node From End of List

Given a linked list, remove the nth node from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. After removing the second node from the end, the

2014-05-23 19:46:25 678

原创 Rotate List

Given a list, rotate the list to the right by k places, where k is non-negative.For example:Given 1->2->3->4->5->NULL and k = 2,return 4->5->1->2->3->NULL.循环列表应用

2014-05-23 19:29:08 749

原创 Remove Duplicates from Sorted List II

Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.For example,Given 1->2->3->3->4->4->5, return 1->2->5.Given 1->1->1

2014-05-23 18:35:21 857

原创 Remove Duplicates from Sorted List

Given a sorted linked list, delete all duplicates such that each element appear only once.For example,Given 1->1->2, return 1->2.Given 1->1->2->3->3, return 1->2->3.henjianda

2014-05-23 16:14:46 846

原创 Partition List

Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.You should preserve the original relative order of the nodes in each of t

2014-05-23 15:59:54 633

原创 Reverse Linked List II

Reverse a linked list from position m to n. Do it in-place and in one-pass.For example:Given 1->2->3->4->5->NULL, m = 2 and n = 4,return 1->4->3->2->5->NULL.Note:Given m, n satisfy the fol

2014-05-22 23:24:03 553

原创 Add Two Numbers

You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a link

2014-05-22 21:02:56 632

原创 4Sum

Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target.Note:Elements

2014-05-21 22:58:38 990

原创 子集法NFA转DFA

词法分析中zhongyao

2014-05-21 00:40:10 10550 1

原创 3Sum Closest

Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exact

2014-05-20 00:00:05 837

原创 3Sum

Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note:Elements in a triplet (a,b,c)

2014-05-19 19:44:39 884

原创 javascript的alert box在java中显示多行问题

如果直接在javascript代码中,显示多行直接加\n就好了:

2014-05-17 11:07:46 2876

原创 java变量和javascript变量之间的传递

最近在用jsp做一个网站,其间涉及到java变量和javascriptbianlang

2014-05-16 15:33:46 4092

原创 Two Sum

Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers such that they add up to the target, whe

2014-05-14 23:27:55 714

原创 Symmetric Tree

Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ 2 2 / \ / \3 4 4 3But the f

2014-05-14 21:10:51 704

原创 Same Tree

Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical and the nodes have the same value.判断两棵树是否x

2014-05-14 20:07:26 711

原创 Binary Tree Level Order Traversal II

Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).For example:Given binary tree {3,9,20,#,#,15,7},

2014-05-14 19:24:48 1327

原创 Binary Tree Level Order Traversal

Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree {3,9,20,#,#,15,7}, 3 / \ 9 20

2014-05-14 18:59:52 6689 2

原创 Binary Tree Inorder Traversal

Given a binary tree, return the inorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [1,3,2].Note: Recursive solutio

2014-05-13 17:05:22 796

原创 Binary Tree Preorder Traversal

Given a binary tree, return the preorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [1,2,3].Note: Recursive soluti

2014-05-13 16:41:02 730

原创 二叉树遍历(递归和非递归)及应用

二叉树的遍历方法主要有qianxubianl

2014-05-10 23:20:18 1620

原创 广义表法建立二叉树

一直以来对树稍微存在一点儿恐惧感,最近打算好好顺yi

2014-05-10 17:03:51 4978

原创 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 is [1, 2, 3

2014-05-08 16:25:33 2311

原创 Median of Two Sorted Arrays

There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).

2014-05-06 16:52:35 876

原创 Search in Rotated Sorted Array

Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).You are given a target value to search. If found in the array retur

2014-05-02 15:52:40 740

原创 Remove Duplicates from Sorted Array

Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this in place with

2014-04-30 22:25:29 550

转载 网站资源

http://search.csdn.net/CSDN搜索,CSDN还是有非常多的编程资源的,用它的搜索能搜出不少东西。代码类别也比较全面。http://snippets.org/简单实用的代码收集网站,强力推荐。比如你要找个DES加密,要找个数据压缩,找个INI文件操作的C代码等,均能手到擒来。http://www.codase.com/index.html它是一个代

2014-04-30 20:00:06 748

转载 linux下C++编程

就C++开发工具而言,与Windows下微软(VC, VS2005等)一统天下相比,Linux/Unix下C++开发,可谓五花八门,各式各样。Emacs, vi, eclipse, anjuta,kdevelop等层出不穷。        Windows下,开发工具多以集成开发环境IDE的形式展现给最终用户。例如,VS2005集成了编辑器,宏汇编ml,C /C++编译器cl,资源编译器

2014-04-30 19:30:26 825

原创 排序算法Java实现

1.冒泡排序

2014-04-28 16:22:57 646

原创 生产者---消费者问题

主要是为了解决

2014-04-12 19:49:49 1555

原创 看C++Primer问题集合

1.int month=09编译错误?解释: 0开头表示八进制    0x表示十六进制测试代码:#includeusing namespace std;void main(){ int month =9,day=7; int month1 =06,day1=017; cout << month << " "<< day1<<endl;}测试结果:

2014-03-26 00:43:33 890

原创 成为一个优秀的人

今天听了摩根士丹利的宣讲会,发现自己跟优秀还有很大的gap,coding ability,一般;english skills,差劲;感触还挺多的,在这个充满竞争的社会中,从普通人当中脱离出来的也只是少部分!以前总是想去到一个外企工作,但是随着时间的推移,这个目标逐渐在脑子里消散,似乎并不是我的目标了,而今天摩根士丹利有激起了申请外企公司的欲望。马上就要进入社会了,有点儿新奇,同时对未知也有一些恐惧

2014-03-25 23:42:38 953 3

原创 走上技术的道路

看过很多牛人的博客,也想过要自己去写博客,但是总是觉得自己的技术没有任何优势,也没有看什么高端的算法,没什么值得去说的。今天去华为机试发现自己的编程能力真是弱爆了,觉得自己离技术很远很远。三年大学并没有让我成为一个技术牛人,等到真正去面试笔试才发现自己学习的东西真是太少太少。于是立志奋发图强,关注各种技能提升的书,去学习技术,去理解技术!大一学过C++,这是我接触编程的第一门语言,也是我最终想找到

2014-03-25 00:07:46 949

ibsvm-3.1-[FarutoUltimate3.1Mcode

libsvm很有用的工具包

2016-06-02

python模拟登陆新浪微博

用python实现了新浪微博的模拟登陆,新浪微博各种加密,各种跳转,详细分析登陆过程并实现!

2015-09-25

异常处理的两个实验代码

初学者异常处理可以参考这两个代码 对于高手就不用看了

2012-05-26

空空如也

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

TA关注的人

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