自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

yaxi_wx的专栏

快乐的小码农

  • 博客(14)
  • 收藏
  • 关注

原创 JAVA学习_2面向对象

类和对象              1. this:

2014-07-22 22:23:28 344

原创 LeetCode -- InsertionSor List

Sort a linked list using insertion sort./** * Definition for singly-linked list. * public class ListNode { *     int val; *     ListNode next; *     ListNode(int x) { *         val = x;

2014-07-17 22:38:49 423

原创 LeetCode -- ReverseWordsinaString

Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".这里有两种qing

2014-07-15 20:24:35 338

原创 LeetCode -- LinkedListCycle

Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?

2014-07-14 22:12:53 378

原创 LeetCode -- UniqueBinarySearchTrees

Given n, how many structurally unique BST's (binary search trees) that store values 1...n?For example,Given n = 3, there are a total of 5 unique BST's.当n = 0 时为空树,所以BST的个数为1当n = 1 时只有一个节点,

2014-07-14 21:12:19 344

原创 LeetCode -- ReverseInteger

Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321

2014-07-14 19:30:32 349

原创 LeetCode -- sameTree

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.采用先序遍历的思想,

2014-07-10 23:19:47 437

原创 LeetCode -- maxDepth

Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.比较左右子树的高度,选最高的叠加

2014-07-10 23:14:19 469

原创 LeetCode -- singleNumber

Given an array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without using e

2014-07-10 23:07:56 339

原创 JAVA学习_1基础

文档注释变量声明数组

2014-07-03 11:06:14 464

原创 java-随机数的产生

产生随机数的方式:Math.random()产生随机数,产生的是0-1之间的double,如果要得到其他范围之类的,就乘上一个系数在java.util包里面提供了一个Random类,可以通过Random的对象来产生随机数。java.util.Random类有两种不同的构建方式:带种子和不带种子不带种子:     没有提供种子数,Random实例的种子数将是当前时间的毫秒数

2014-04-12 12:31:29 646

原创 POJ-1003-HangOver

DescriptionHow far can you make a stack of cards overhang a table? If you have one card, you can create a maximum overhang of half a card length. (We're assuming that the cards must be perpendicul

2014-01-16 17:16:58 436

原创 1004西西弗斯式的命运

Description古希腊有个关于西西弗斯的神话:西西弗斯被众神判决推运一块石头至山顶。由于巨石本身的重量,它被推到山顶却又总要滚下山脚。于是西西弗斯又得把石块推上山去。如此反复,永无止境,没有尽头。众神认为,让西西弗斯服这永恒的劳役是最严酷的惩罚。二哥被押入地狱。他被众神判决扛着一块巨砖在山路上走,再原路返回,如此反复,没有尽头。众神规定二哥独自走山路的时间不得

2013-04-25 17:18:07 1099

原创 1003二哥养细菌

题目描述二哥不仅种苹果和花生,还养了很多细菌。二哥的细菌培养皿成方格形,边长为L。长期培养后,二哥发现了细菌繁殖的规律:最初每个格子里的细菌及其后代都会独立繁殖,每次繁殖都会在其上下左右四个相邻的格子里产生新的细菌,而已经存在的细菌在培养皿充满细菌之前都不会死亡。另外,有一些格子里可能还有抗生素,细菌在有抗生素的格子里无法繁殖。二哥于是发明了一个游戏:取一个新的培养皿,在某些格子里

2013-04-25 17:16:57 1309

空空如也

空空如也

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

TA关注的人

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