自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

转载 【自己动手】实现简单的C++ smart pointer

转自 http://blog.csdn.net/ruizeng88/article/details/6691191 Why Smart Pointer? 为什么需要智能指针?因为c++的内存管理一直是个令人头疼的问题。 假如我们有如下person对象:每个person有自己的名字,并且...

2014-01-26 17:23:51

阅读数 822

评论数 0

原创 Primes

There is a basic way to judge whether a number is a prime: int isprime(int x) { int i; float fx,sqrtx; if(x<=1) return ...

2014-01-16 22:37:17

阅读数 1057

评论数 0

转载 DP for bombs

There are n bombs in a big circle,and each bomb has a value and a 'effect range'.If you detonated a bomb,you will get this bomb's value,but a bomb ...

2014-01-16 19:24:39

阅读数 735

评论数 0

转载 Java集合类ArrayList循环中删除特定元素

适合各种集合类的删除: 在项目开发中,我们可能往往需要动态的删除ArrayList中的一些元素。 一种错误的方式: [java] view plaincopy for(int i = 0 , len= list.size();i   i...

2014-01-16 17:46:12

阅读数 540

评论数 0

原创 CareerCup Eliminate all ‘b’ and ‘ac’ in an array of characters

Eliminate all ‘b’ and ‘ac’ in an array of characters, you have to replace them in-place, and you are only allowed to iterate over the char array once...

2014-01-14 19:22:52

阅读数 673

评论数 0

原创 CareerCup Find the biggest interval that has all its members in list in O(n)

Given a list of integers, find out the biggest interval that has all its members in the given list. e.g. given list 1, 7, 4, 6, 3, 10, 2 then answe...

2014-01-14 18:40:53

阅读数 809

评论数 0

转载 CareerCup Rearrange an array using swap with 0

Rearrange an array using swap with 0.  You have two arrays src, tgt, containing two permutations of the numbers 0..n-1. You would like to rearrange ...

2014-01-12 09:08:44

阅读数 1265

评论数 0

转载 CareerCup 2^i * 3^j * 5^k * 7^l

Given an equation in the form 2^i * 3^j * 5^k * 7^l where i,j,k,l >=0 are integers.write a program to generate numbers from that equation in sorte...

2014-01-11 21:27:36

阅读数 2319

评论数 0

转载 CareerCup the maximum longest continous sequence of 0s

Given a binary representation of an integer say 15 as 1111, find the maximum longest continous sequence of 0s. The twist is it needs to be done in lo...

2014-01-11 21:01:02

阅读数 674

评论数 0

转载 CareerCup Sort an array in a special way

Give you an array which has n integers,it has both positive and negative integers.Now you need sort this array in a special way.After that,the negati...

2014-01-10 23:29:48

阅读数 1031

评论数 0

转载 CarreerCup Sort Height

You are given two array, first array contain integer which represent heights of persons and second array contain how many persons in front of him are...

2014-01-08 17:11:51

阅读数 830

评论数 0

原创 CareerCup Find the smallest range that includes at least one number from each of the k sorted lists.

You have k lists of sorted integers. Find the smallest range that includes at least one number from each of the k lists. For example, List 1: [4, 10,...

2014-01-08 16:24:49

阅读数 1034

评论数 0

转载 CareerCup Pots of gold game:看谁拿的钱多

问题描述: Pots of gold game: Two players A & B. There are pots of gold arranged in a line, each containing some gold coins (the players can see...

2014-01-08 15:54:32

阅读数 673

评论数 0

转载 几个大数据的问题

2、搜索引擎会通过日志文件把用户每次检索使用的所有检索串都记录下来,每个查询串的长度为1-255字节。     假设目前有一千万个记录(这些查询串的重复度比较高,虽然总数是1千万,但如果除去重复后,不超过3百万个。一个查询串的重复度越高,说明查询它的用户越多,也就是越热门。),请你统计最热门的1...

2014-01-01 17:41:48

阅读数 512

评论数 0

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