
LeetCode面试题
葫芦赛赛
关注机器学习、数据挖掘,欢迎大家交流学习。
展开
-
Combination Sum | && || Leetcode
Combination Sum Leetcode原创 2016-03-24 21:10:00 · 625 阅读 · 1 评论 -
Median of Two Sorted Arrays
There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).这个题目体现了很好的算法分析思想。原创 2014-08-18 19:02:28 · 588 阅读 · 0 评论 -
Longest Consecutive Sequence
HashMap 在leetcode Longest Consecutive Sequence 上巧妙使用。原创 2014-09-13 15:13:32 · 1066 阅读 · 0 评论 -
Search in Rotated Sorted Array
旋转数组中搜索元素,二分查找变换形式。原创 2014-08-30 20:30:31 · 816 阅读 · 0 评论 -
LeetCode LRU Cache 百度笔试
设计一个LRU( Least Recently Used ) cache ,百度笔试题原创 2014-08-15 15:39:51 · 823 阅读 · 0 评论 -
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原创 2014-08-17 15:37:36 · 722 阅读 · 0 评论 -
Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3. For原创 2014-08-18 10:48:55 · 592 阅读 · 0 评论 -
Remove Nth Node From End of List
删除链表倒数第n个结点,只能遍历一次链表。原创 2014-08-31 10:02:28 · 784 阅读 · 0 评论 -
Surrounded Regions
leetcode 经典搜索题目 Surrounded Regions ,深度优先搜索和广度优先搜索分别实现Surrounded Regions 。原创 2014-09-12 21:21:45 · 1388 阅读 · 0 评论 -
Add Two Numbers
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a link原创 2014-08-17 19:26:59 · 706 阅读 · 0 评论 -
Restore IP Addresses
Leetcode 经典题 Restore IP Addresses原创 2014-09-23 15:32:32 · 1144 阅读 · 0 评论 -
Permutations Permutations||
全排列在leetcode Permutations Permutations|| 两道题目上的实现。原创 2014-08-29 11:40:20 · 899 阅读 · 0 评论 -
Word Break && Word Break ||
Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words.For example, givens = "leetcode",dict = ["leet"原创 2014-08-16 18:32:58 · 529 阅读 · 0 评论 -
Reorder List 微软2014校园招聘笔试题
leetcode Reorder List 微软2014校园招聘笔试题原创 2014-08-31 21:32:35 · 1020 阅读 · 0 评论 -
Word Ladder
leetcode 难题 Word Ladder ,广搜算法的应用。原创 2014-09-13 16:59:04 · 1250 阅读 · 0 评论 -
Word Search
Leetcode 经典搜索类型题目 Word Search原创 2014-10-02 11:20:40 · 1181 阅读 · 0 评论 -
Maximal Rectangle
Leetcode 推荐经典好题Maximal Rectangle ,和Largest Rectangle in Histogram关联很大原创 2014-10-01 13:33:33 · 1158 阅读 · 0 评论 -
Largest Rectangular Area in a Histogram
Leetcode 利用stack经典题Largest Rectangular Area in a Histogram原创 2014-10-01 12:02:00 · 1999 阅读 · 0 评论 -
Interleaving String
Leetcode经典题 字符串DP处理经典题。原创 2014-09-29 00:32:28 · 1216 阅读 · 0 评论 -
Minimum Window Substring
leetcode 经典题Minimum Window Substring ,很巧妙算法。原创 2014-10-06 20:02:41 · 1615 阅读 · 0 评论 -
Decode Ways
Leetcode 经典题Decode Ways 容易误入错误思路原创 2014-09-25 19:18:14 · 892 阅读 · 0 评论 -
Maximum Product Subarray
leetcode 新增题目Maximum Product Subarray原创 2014-09-24 15:09:22 · 3159 阅读 · 7 评论 -
Linked List Cycle II Linked List Cycle
链表的经典面试题:判断链表是否有环,链表环的开始结点。原创 2014-09-02 13:57:03 · 827 阅读 · 0 评论 -
Binary Tree Postorder Traversal 二叉树的后序遍历
二叉树的递归和非递归后序遍历总结。原创 2014-09-01 19:34:29 · 893 阅读 · 0 评论 -
Divide Two Integers
题意就是两个数相除,不能使用除法,乘法,取模。尽快实现两个数相除,很体现算法思想题目。原创 2014-08-26 20:52:47 · 879 阅读 · 0 评论 -
Binary Tree Preorder Traversal
二叉树前序遍历非递归实现。原创 2014-09-01 21:46:07 · 693 阅读 · 0 评论 -
Insertion Sort List 链表插入排序
链表的插入排序。原创 2014-08-31 22:33:55 · 1147 阅读 · 0 评论 -
Palindrome Partitioning II
leetcode 经典题 DP Palindrome Partitioning II原创 2014-09-11 23:07:39 · 1025 阅读 · 0 评论 -
Pow(x, n)
题目要求实现这个Pow(x, n)函数,暴力法是无法在短时间进行有效的计算。通过结合位运算巧妙计算。原创 2014-08-22 10:33:44 · 687 阅读 · 0 评论 -
Best Time to Buy and Sell Stock||
Leetcode 经典题Best Time to Buy and Sell Stock||原创 2014-09-20 11:01:34 · 959 阅读 · 0 评论 -
Path Sum && Path Sum ||
题目:https://oj.leetcode.com/problems/path-sum/原创 2014-08-24 10:41:39 · 701 阅读 · 0 评论 -
Valid Palindrome
经典回文面试题变形体。原创 2014-09-19 22:02:28 · 951 阅读 · 0 评论 -
Best Time to Buy and Sell Stock
Leetcode 经典题 Best Time to Buy and Sell Stock原创 2014-09-20 09:48:39 · 1067 阅读 · 0 评论 -
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 val原创 2014-08-21 21:12:48 · 646 阅读 · 0 评论 -
Generate Parentheses
题目地址:原创 2014-08-22 20:59:09 · 796 阅读 · 0 评论 -
3Sum Closest
Given an array S of n integers, find three integers inS such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exactl原创 2014-08-21 09:30:29 · 594 阅读 · 0 评论 -
3Sum
Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note:Elements in a triplet (a,b,c)原创 2014-08-20 19:07:08 · 867 阅读 · 0 评论 -
Candy
leetcode Candy 很好精巧回溯算法思想,锻炼思维。原创 2014-09-05 09:05:57 · 1005 阅读 · 0 评论 -
Copy List with Random Pointer
特殊链表的深拷贝。原创 2014-09-04 16:02:24 · 1158 阅读 · 0 评论 -
Single Number 谷歌面试题
Single Number 整形数组,只有一个数出现一次,其它都出现2次,求出那个只出现一次的那个数。原创 2014-09-04 12:32:45 · 1062 阅读 · 0 评论