摘要: 原题链接在这里:https://leetcode.com/problems/word-ladder/ 题目: Given two words (beginWord and endWord), and a dictionary's word list, find the length of short 阅读全文
posted @ 2015-10-17 07:03 Dylan_Java_NYC 阅读(515) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:http://www.lintcode.com/en/problem/kth-largest-element/#在LeetCode上也有一道,采用了标准的quickSelect 方法,另外写了一篇帖子,代码更加模块化。采用的quickSelect方法,取出pivot, 比pivot ... 阅读全文
posted @ 2015-10-17 05:58 Dylan_Java_NYC 阅读(271) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/median-of-two-sorted-arrays/ 题目: here are two sorted arrays nums1 and nums2 of size m and n respectively. Find t 阅读全文
posted @ 2015-10-17 04:49 Dylan_Java_NYC 阅读(386) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/insert-interval/ 题目: Given a set of non-overlapping intervals, insert a new interval into the intervals (merge i 阅读全文
posted @ 2015-10-16 22:51 Dylan_Java_NYC 阅读(293) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/merge-intervals/ 题目: Given a collection of intervals, merge all overlapping intervals. For example,Given [1,3],[ 阅读全文
posted @ 2015-10-16 22:24 Dylan_Java_NYC 阅读(429) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/search-in-rotated-sorted-array-ii/ 题目: Follow up for "Search in Rotated Sorted Array":What if duplicates are all 阅读全文
posted @ 2015-10-15 10:26 Dylan_Java_NYC 阅读(300) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/description/ 题目: Given an array of integers sorted in as 阅读全文
posted @ 2015-10-15 09:33 Dylan_Java_NYC 阅读(1263) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/search-insert-position/description/ 题目: Given a sorted array and a target value, return the index if the target 阅读全文
posted @ 2015-10-15 08:42 Dylan_Java_NYC 阅读(298) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/search-a-2d-matrix-ii/ 题目: Write an efficient algorithm that searches for a value in an m x n matrix. This matri 阅读全文
posted @ 2015-10-15 07:01 Dylan_Java_NYC 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/search-a-2d-matrix/ 题目: Write an efficient algorithm that searches for a value in an m x n matrix. This matrix h 阅读全文
posted @ 2015-10-15 03:43 Dylan_Java_NYC 阅读(387) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/trapping-rain-water/ 题目: Given n non-negative integers representing an elevation map where the width of each bar 阅读全文
posted @ 2015-10-15 02:42 Dylan_Java_NYC 阅读(432) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/product-of-array-except-self/ 题目: Given an integer array nums, return an array answer such that answer[i] is equ 阅读全文
posted @ 2015-10-15 02:10 Dylan_Java_NYC 阅读(464) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/first-missing-positive/ 题目: Given an unsorted integer array, find the smallest missing positive integer. Example 阅读全文
posted @ 2015-10-15 01:23 Dylan_Java_NYC 阅读(374) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/find-the-duplicate-number/ 题目: Given an array nums containing n + 1 integers where each integer is between 1 and 阅读全文
posted @ 2015-10-15 00:32 Dylan_Java_NYC 阅读(334) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/missing-number/ 题目: Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that i 阅读全文
posted @ 2015-10-15 00:05 Dylan_Java_NYC 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/find-peak-element/ 题目: A peak element is an element that is greater than its neighbors. Given an input array whe 阅读全文
posted @ 2015-10-14 12:53 Dylan_Java_NYC 阅读(430) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/copy-list-with-random-pointer/ 题目: A linked list is given such that each node contains an additional random poin 阅读全文
posted @ 2015-10-14 12:17 Dylan_Java_NYC 阅读(411) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/rotate-list/ 题目: Given a list, rotate the list to the right by k places, where k is non-negative. For example:Gi 阅读全文
posted @ 2015-10-14 11:10 Dylan_Java_NYC 阅读(421) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/merge-k-sorted-lists/ 题目: Merge k sorted linked lists and return it as one sorted list. Analyze and describe its 阅读全文
posted @ 2015-10-14 09:07 Dylan_Java_NYC 阅读(244) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/merge-two-sorted-lists/ 题目: Merge two sorted linked lists and return it as a new list. The new list should be ma 阅读全文
posted @ 2015-10-14 09:04 Dylan_Java_NYC 阅读(234) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/game-of-life/ 题目: According to the Wikipedia's article: "The Game of Life, also known simply as Life, is a cellu 阅读全文
posted @ 2015-10-11 10:02 Dylan_Java_NYC 阅读(710) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/set-matrix-zeroes/ 题目: Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in-pl 阅读全文
posted @ 2015-10-11 08:06 Dylan_Java_NYC 阅读(305) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/minimum-size-subarray-sum/ 题目: Given an array of n positive integers and a positive integer s, find the minimal 阅读全文
posted @ 2015-10-11 06:51 Dylan_Java_NYC 阅读(423) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/course-schedule-ii/ 题目: There are a total of n courses you have to take, labeled from 0 to n - 1. Some courses m 阅读全文
posted @ 2015-10-11 04:56 Dylan_Java_NYC 阅读(297) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/course-schedule/description/ 题目: There are a total of n courses you have to take, labeled from 0 to n - 1. Some 阅读全文
posted @ 2015-10-10 12:17 Dylan_Java_NYC 阅读(774) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/clone-graph/description/ 题目: Given a reference of a node in a connected undirected graph. Return a deep copy (cl 阅读全文
posted @ 2015-10-10 09:04 Dylan_Java_NYC 阅读(492) 评论(0) 推荐(0) 编辑
摘要: 1. BFS2. QuickSort3. PCA, 1000 articles, so many factors, how to reduce factors.4. newton's method5. multiple thread synchronized6. Design Pattern in ... 阅读全文
posted @ 2015-10-08 00:48 Dylan_Java_NYC 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 转自这篇帖子:http://www.importnew.com/7010.html HashMap和Hashtable的比较是Java面试中的常见问题,用来考验程序员是否能够正确使用集合类以及是否可以随机应变使用多种思路解决问题。HashMap的工作原理、ArrayList与Vector的比较以及这 阅读全文
posted @ 2015-10-06 00:51 Dylan_Java_NYC 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 转载自:http://www.cnblogs.com/springfor/p/4036739.htmlC++ supports pointers whereas Java does not. But when many programmers questioned how you can work ... 阅读全文
posted @ 2015-10-05 07:33 Dylan_Java_NYC 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/search-in-rotated-sorted-array/ 题目: Suppose an array sorted in ascending order is rotated at some pivot unknown 阅读全文
posted @ 2015-10-05 06:52 Dylan_Java_NYC 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/find-minimum-in-rotated-sorted-array-ii/ 题目: Follow up for "Find Minimum in Rotated Sorted Array":What if duplic 阅读全文
posted @ 2015-10-05 06:05 Dylan_Java_NYC 阅读(272) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/find-minimum-in-rotated-sorted-array/description/ 题目: Suppose an array sorted in ascending order is rotated at s 阅读全文
posted @ 2015-10-05 05:27 Dylan_Java_NYC 阅读(351) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/sort-colors/ 题目: Given an array with n objects colored red, white or blue, sort them so that objects of the same 阅读全文
posted @ 2015-10-01 22:47 Dylan_Java_NYC 阅读(288) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/next-permutation/ 题目: Implement next permutation, which rearranges numbers into the lexicographically next great 阅读全文
posted @ 2015-10-01 21:18 Dylan_Java_NYC 阅读(333) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/permutation-sequence/ 题目: The set [1,2,3,…,n] contains a total of n! unique permutations. By listing and labelin 阅读全文
posted @ 2015-09-30 03:43 Dylan_Java_NYC 阅读(295) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/combination-sum-iii/ 题目: Find all possible combinations of k numbers that add up to a number n, given that only 阅读全文
posted @ 2015-09-29 00:29 Dylan_Java_NYC 阅读(325) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/combination-sum-ii/ 题目: Given a collection of candidate numbers (C) and a target number (T), find all unique com 阅读全文
posted @ 2015-09-28 23:37 Dylan_Java_NYC 阅读(413) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/combination-sum/ 题目: Given an array of distinct integers candidates and a target integer target, return a list o 阅读全文
posted @ 2015-09-28 23:12 Dylan_Java_NYC 阅读(467) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/permutations-ii/ 题目: Given a collection of numbers that might contain duplicates, return all possible unique per 阅读全文
posted @ 2015-09-27 12:41 Dylan_Java_NYC 阅读(327) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/permutations/ 题目: Given a collection of distinct numbers, return all possible permutations. For example,[1,2,3]  阅读全文
posted @ 2015-09-27 11:51 Dylan_Java_NYC 阅读(761) 评论(0) 推荐(0) 编辑