上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 34 下一页

2015年4月27日

Next Permutation

摘要: Next Permutation问题:Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrange... 阅读全文

posted @ 2015-04-27 15:00 zhouzhou0615 阅读(121) 评论(0) 推荐(0) 编辑

Gray Code

摘要: Gray Code问题:The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integernrepresenting the ... 阅读全文

posted @ 2015-04-27 10:48 zhouzhou0615 阅读(177) 评论(0) 推荐(0) 编辑

Number of Islands

摘要: 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 ... 阅读全文

posted @ 2015-04-27 10:14 zhouzhou0615 阅读(152) 评论(0) 推荐(0) 编辑

2015年4月26日

Binary Tree Right Side View

摘要: Binary Tree Right Side View问题:Given a binary tree, imagine yourself standing on therightside of it, return the values of the nodes you can see ordered... 阅读全文

posted @ 2015-04-26 22:41 zhouzhou0615 阅读(124) 评论(0) 推荐(0) 编辑

Remove Linked List Elements

摘要: Remove Linked List Elements问题: Remove all elements from a linked list of integers that have valueval.思路: 简单的链表操作我的代码:public class Solution { publ... 阅读全文

posted @ 2015-04-26 22:10 zhouzhou0615 阅读(133) 评论(0) 推荐(0) 编辑

House Robber

摘要: House Robber问题:You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constra... 阅读全文

posted @ 2015-04-26 22:03 zhouzhou0615 阅读(160) 评论(0) 推荐(0) 编辑

Happy Number

摘要: Happy Number问题:Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any p... 阅读全文

posted @ 2015-04-26 21:37 zhouzhou0615 阅读(198) 评论(0) 推荐(0) 编辑

出差回来--快速排序

摘要: 被导师派出差加上之前的大摩的面试,两周的时间都在飞机或者火车上,弄的回到学校浮躁,状态不是很好。 调整状态最好的办法就是去做了,今天下午写了一下,一直不愿意写的快速排序算法,分享一下~public class QuickSort { /** * @param args *... 阅读全文

posted @ 2015-04-26 16:44 zhouzhou0615 阅读(148) 评论(0) 推荐(0) 编辑

2015年4月25日

(转)败者树 和 胜者树---数组实现

摘要: 转自:http://blog.csdn.net/sqx2011/article/details/8241734胜者树和败者树都是完全二叉树,是树形选择排序的一种变型。每个叶子结点相当于一个选手,每个中间结点相当于一场比赛,每一层相当于一轮比赛。 不同的是,胜者树的中间结点记录的是胜者的标号;而败者树... 阅读全文

posted @ 2015-04-25 11:58 zhouzhou0615 阅读(858) 评论(0) 推荐(0) 编辑

2015年4月17日

java 并交集运算

摘要: 在面试的过程中,忘记了List中还可以进行交并集运算,这也是常见的数据问题啊,这也是常见的数据结构问题---集合,面试的过程中一直没有想到这种数据结构 java中API中已经集成了并交集的运算。 代码:(from http://pengyan5945.iteye.com/blog/13115... 阅读全文

posted @ 2015-04-17 10:51 zhouzhou0615 阅读(864) 评论(0) 推荐(0) 编辑

上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 34 下一页

导航