自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Poem~

工作,生活,技能

  • 博客(23)
  • 资源 (2)
  • 收藏
  • 关注

原创 腾讯2014实习生笔试题目

题目一:http://www.itmian4.com/forum.php?mod=viewthread&tid=4761&extra=page%3D1%26filter%3Dtypeid%26typeid%3D1%26typeid%3D1               答案网址一:http://www.tuicool.com/articles/F7Bzeq

2015-03-27 17:33:59 492

原创 leetcode: Jump Game

Jump Game Total Accepted: 37122 Total Submissions: 135980My SubmissionsQuestion Solution Given an array of non-negative integers, you are initially positioned at the first index

2015-03-21 11:42:45 345

原创 leetcode: Candy

There are N children standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following requirements:Each child must have at least one

2015-03-21 10:40:21 366

原创 给出两个字符串a和b,判断字符串a是否包含字符串b

题目:给出两个字符串a和b,例如 a=”ABJKI“, b=“JK”,则 a 包含 b 。下面的方法很巧妙啊。

2015-03-20 19:07:28 10631

原创 合并两个有序数组(48页)

剑指offer:有两个排序数组A1和A2,内存在A1的末尾有足够多的剩余空间容纳A2,请实现一个函数,把A2中的所有数字插入到A1中并且所有的数字都是有序的。思想: 同上一篇博文,从后往前遍历插入的思想。下面的代码没有经过测试,不知道对不对呢???????void MergeArray(int a[], int b[], int a_len, int b_len) { //

2015-03-19 19:56:19 363

原创 替换空格 (44页)

剑指offer(44页):题目:请实现一个函数,把字符串中的每个空格替换成“%20”,思想:   算法时间复杂度是O(n),是在原来的字符串上做的替换,并且保证输入后的字符串后面有足够多的空余内存   若我们按照常规的思想:从前往后扫描空格,并同时将空格后的字符向后移动,那么时间复杂度就将会是O(n的平方),   那我们能不能减少移动次数呢?当然可以,做法就是从后往前扫描空格并

2015-03-19 16:33:55 378

原创 第一个只出现一次的字符

剑指offer:186页题目:第一个只出现一个的字符,如输入:“abaccdeff”,则输出b#include#includeusing namespace std;char FirstNotRepeatingChar(char* pString){ /* * 在字符串中找出第一个只出现一次的字符,如输入:“abaaffll”,则输出b * 测试用例:1) 字符串为空; *

2015-03-17 14:17:53 275

转载 结构体字节对齐和位域对齐——VC、gcc

结构体字节对齐和位域对齐——VC、gcc分类: C/C++2012-10-13 15:34 474人阅读 评论(0) 收藏 举报转自:http://blog.csdn.net/joogle/article/details/8067550(1)什么是字节对齐一个变量占用 n 个字节,则该变量的起始地址必须能够被 n 整除,即: 存放起始地 址 %

2015-03-15 21:23:59 405

转载 C++强大背后

C++强大背后2010-09-17 00:56 by Milo Yip, 54970 阅读, 124 评论, 收藏, 编辑在31年前(1979年),一名刚获得博士学位的研究员,为了开发一个软件项目发明了一门新编程语言,该研究员名为Bjarne Stroustrup,该门语言则命名为——C with classes,四年后改称为C++。C++是一门通用编程语言,支持多种编程范式,

2015-03-15 19:12:20 355

原创 2014年阿里研发笔试题:在text中找出以同样的顺序连续出现在query中的最长连续字母序列的长度

题目描述:给定一个query和一个text,均由小写字母组成。要求在text中找出以同样的顺序连续出现在query中的最长连续字母序列的长度。例如, query为“acbac”,text为“acaccbabb”,那么text中的“cba”为最长的连续出现在query中的字母序列,因此,返回结果应该为其长度3。请注意程序效率。思想:用vector建立一个二维向量markMatrix,markMa

2015-03-15 18:36:34 1099

原创 leetcode:valid parentheses

Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.The brackets must close in the correct order, "()" and "()[]{}" are all va

2015-03-14 16:41:55 275

原创 ZigZag Convert

The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)P A H NA P L S I

2015-03-14 11:45:28 305

原创 leetcode: length of last word

Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string.If the last word does not exist, return 0.Note: A word is

2015-03-12 16:17:05 332

原创 leetcode: wildcard matching

Implement wildcard pattern matching with support for '?' and '*'.'?' Matches any single character.'*' Matches any sequence of characters (including the empty sequence).The matching should cover t

2015-03-12 16:14:08 368

转载 unix系统中的内存分布情况

参见:http://my.oschina.net/pollybl1255/blog/140323

2015-03-11 22:57:32 350

转载 C++的内存分配区域(esp:堆和栈)

在计算机领域,堆栈是一个不容忽视的概念,我们编写的C语言程序基本上都要用到。但对于很多的初学着来说,堆栈是一个很模糊的概念。堆栈:一种数据结构、一个在程序运行时用于存放的地方,这可能是很多初学者的认识,因为我曾经就是这么想的和汇编语言中的堆栈一词混为一谈。我身边的一些编程的朋友以及在网上看帖遇到的朋友中有好多也说不清堆栈,所以我想有必要给大家分享一下我对堆栈

2015-03-11 19:50:41 1385

原创 leetcode: string to integer (atoi)

Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input ca

2015-03-11 16:00:03 282

转载 给定一个乱序数组,找到其中第K大的值,要求时间复杂度最低

寻找第K大的数的方法总结      今天看算法分析是,看到一个这样的问题,就是在一堆数据中查找到第k个大的值。      名称是:设计一组N个数,确定其中第k个最大值,这是一个选择问题,当然,解决这个问题的方法很多,本人在网上搜索了一番,查找到以下的方式,决定很好,推荐给大家。      所谓“第(前)k大数问题”指的是在长度为n(n>=k)的乱序数组中S找出从大到小顺

2015-03-10 21:31:38 10731

原创 leetcode: rotate image

You are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?Hide Tags Array#include#includeusing namespace

2015-03-10 11:35:27 365

原创 leetcode: 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, where

2015-03-09 11:41:11 359

原创 remove element

Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't matter what you leave beyond the new length.

2015-03-08 16:48:21 256

转载 LeetCode题目总结/分类

http://www.douban.com/note/330562764/注:此分类仅供大概参考,没有精雕细琢。有不同意见欢迎评论~欢迎参考我的leetcode代码利用堆栈:http://oj.leetcode.com/problems/evaluate-reverse-polish-notation/http://oj.leetcode.com/problems/

2015-03-07 20:49:49 406

原创 rotate array

Rotate an array of n elements to the right by k steps.For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4].Note: Try to come up as many solutions as you c

2015-03-07 19:42:51 390

java web开发

这个文档对于学习java web的人来说很好,很浅显易懂,学习java的开发人员可以看看,讲的挺好的,可以用于J2EE的面试

2014-07-06

oracle课件

这个ppt对于学习oracle的人来说很好,很浅显易懂,学习数据库的开发人员可以看看,讲的挺好的

2014-07-06

空空如也

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

TA关注的人

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