上一页 1 2 3 4 5 6 7 8 9 10 ··· 21 下一页

2016年7月31日

Word Ladder

摘要: Given two words (beginWord and endWord), and a dictionary's word list, find the length of shortest transformation sequence from beginWord to endWord, 阅读全文

posted @ 2016-07-31 19:30 Sheryl Wang 阅读(155) 评论(0) 推荐(0) 编辑

2016年7月25日

Subsets II

摘要: Given a collection of integers that might contain duplicates, nums, return all possible subsets. Note: The solution set must not contain duplicate sub 阅读全文

posted @ 2016-07-25 17:07 Sheryl Wang 阅读(112) 评论(0) 推荐(0) 编辑

Subsets

摘要: Given a set of distinct integers, nums, return all possible subsets. Note: The solution set must not contain duplicate subsets. For example, If nums = 阅读全文

posted @ 2016-07-25 16:58 Sheryl Wang 阅读(130) 评论(0) 推荐(0) 编辑

2016年7月23日

Maximum Gap

摘要: Given an unsorted array, find the maximum difference between the successive elements in its sorted form. Try to solve it in linear time/space. Return 阅读全文

posted @ 2016-07-23 20:00 Sheryl Wang 阅读(143) 评论(0) 推荐(0) 编辑

Continuous Subarray Sum II

摘要: Given an circular integer array (the next element of the last element is the first element), find a continuous subarray in it, where the sum of number 阅读全文

posted @ 2016-07-23 16:34 Sheryl Wang 阅读(398) 评论(0) 推荐(0) 编辑

2016年7月22日

Continuous Subarray Sum

摘要: Given an integer array, find a continuous subarray where the sum of numbers is the biggest. Your code should return the index of the first number and 阅读全文

posted @ 2016-07-22 23:01 Sheryl Wang 阅读(162) 评论(0) 推荐(0) 编辑

Submatrix Sum

摘要: Given an integer matrix, find a submatrix where the sum of numbers is zero. Your code should return the coordinate of the left-up and right-down numbe 阅读全文

posted @ 2016-07-22 22:56 Sheryl Wang 阅读(376) 评论(0) 推荐(0) 编辑

Maximum Product Subarray

摘要: Find the contiguous subarray within an array (containing at least one number) which has the largest product. For example, given the array [2,3,-2,4],t 阅读全文

posted @ 2016-07-22 22:47 Sheryl Wang 阅读(129) 评论(0) 推荐(0) 编辑

2016年7月18日

Backpack III 完全背包

摘要: Given n kind of items with size Ai and value Vi( each item has an infinite number available) and a backpack with size m. What's the maximum value can 阅读全文

posted @ 2016-07-18 15:56 Sheryl Wang 阅读(286) 评论(0) 推荐(0) 编辑

2016年7月17日

Walls and Gates

摘要: You are given a m x n 2D grid initialized with these three possible values. Fill each empty room with the distance to its nearest gate. If it is impos 阅读全文

posted @ 2016-07-17 15:55 Sheryl Wang 阅读(209) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 9 10 ··· 21 下一页

导航