![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法Algorithm
文章平均质量分 78
CareerBowl
CareerBowl 职业碗
展开
-
[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 · 334 阅读 · 0 评论 -
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 · 7342 阅读 · 0 评论 -
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 · 620 阅读 · 0 评论 -
[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 · 944 阅读 · 0 评论 -
[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 阅读 · 0 评论 -
[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 · 382 阅读 · 0 评论 -
[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 阅读 · 0 评论 -
[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 阅读 · 0 评论 -
[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 阅读 · 0 评论 -
[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 阅读 · 0 评论 -
微软数据结构+算法面试100题
横空出世,席卷互联网 ---评微软数据结构+算法面试100题作者:July。时间:2010年10月-11月。版权所有,侵权必究。出处:http://blog.csdn.net/v_JULY_v。说明:本文原题为:“横空出世,转载 2014-04-18 13:13:30 · 667 阅读 · 0 评论 -
[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 · 406 阅读 · 0 评论