自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(14)
  • 资源 (1)
  • 收藏
  • 关注

原创 Java 中String的HashCode计算方法

/**     * Returns a hash code for this string. The hash code for a     * String object is computed as     *      * s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1]     *      * usi

2014-05-13 21:33:11 7339

原创 [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, w

2014-05-12 21:35:21 404

原创 [LeetCode] 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,

2014-05-12 21:15:11 332

转载 Top 10 Algorithms for Coding Interview 面试十大算法总结

The following are top 10 algorithms related topics for coding interviews. As understanding those concepts requires much more effort, this list below only serves as an introduction. They are viewed fro

2014-04-26 22:39:20 618

原创 [leetCode] LRU Cache (Java)

Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set.get(key) – Get the value (will always be positive) of the key if

2014-04-26 20:52:30 942

原创 [leetcode ]Search in Rotated Sorted Array

* 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 8 0 1 2 3. 6 7 8 0 1 2 3 4 5.You

2014-04-25 14:54:28 381

原创 如何不用循环打印数字1到n

题目:如何打印数字1-到n,qian ti

2014-04-24 22:44:45 1839

原创 [leetcode] Remove Duplicates from Sorted Array

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

2014-04-24 12:36:00 392

原创 [LeetCode] Longest Common Prefix (LCP)

Write a function to find the longest common prefix string amongst an array of strings.模拟法,先选取第一个字符串,之后依次和后面的字符串得出LCP

2014-04-23 15:55:12 418

原创 [LeetCode] 4Sum

Question : 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:Elem

2014-04-23 15:03:36 368

原创 [Leetcode] Reverse Words in a String

Reverse Words in a StringGiven an input string, reverse the string word by word.

2014-04-23 14:44:47 444

原创 [LeetCode] Longest Palindromic Substring 最长回文子串

Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring.思路用一个指针从0遍历到s.size()-1

2014-04-23 14:16:44 426

转载 微软数据结构+算法面试100题

横空出世,席卷互联网                                                                         ---评微软数据结构+算法面试100题作者:July。时间:2010年10月-11月。版权所有,侵权必究。出处:http://blog.csdn.net/v_JULY_v。说明:本文原题为:“横空出世,

2014-04-18 13:13:30 664

原创 CareerBowl 博客开通了

全方位揭示 微软,苹果,谷歌,亚马逊等IT名企招聘秘密,将是程序员

2014-04-18 13:03:34 447

Hacking_a_Google_Interview_Handout

Hacking a Google Interview Handout

2014-04-23

空空如也

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

TA关注的人

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