上一页 1 2 3 4 5 6 7 ··· 12 下一页

2014年10月7日

Remove Duplicates from Sorted List I&&II

摘要: Remove Duplicates from Sorted List Given a sorted linked list, delete all duplicates such that each element appear only once. For example,Given 1->1-> 阅读全文

posted @ 2014-10-07 23:39 bug睡的略爽 阅读(183) 评论(0) 推荐(0) 编辑

Word Search

摘要: Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where "adjac 阅读全文

posted @ 2014-10-07 20:47 bug睡的略爽 阅读(282) 评论(0) 推荐(0) 编辑

Combinations

摘要: Given two integers n and k, return all possible combinations of k numbers out of 1 ... n. For example,If n = 4 and k = 2, a solution is: [ [2,4], [3,4 阅读全文

posted @ 2014-10-07 16:48 bug睡的略爽 阅读(155) 评论(0) 推荐(0) 编辑

Search a 2D Matrix

摘要: Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted f 阅读全文

posted @ 2014-10-07 11:47 bug睡的略爽 阅读(160) 评论(0) 推荐(0) 编辑

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 place. click to show follow up. Follow up: Did you use extra sp 阅读全文

posted @ 2014-10-07 10:49 bug睡的略爽 阅读(108) 评论(0) 推荐(0) 编辑

2014年10月6日

Add Binary

摘要: Given two binary strings, return their sum (also a binary string). For example,a = "11"b = "1"Return "100". 类似模拟十进制加法 阅读全文

posted @ 2014-10-06 21:57 bug睡的略爽 阅读(145) 评论(0) 推荐(0) 编辑

Minimum Path Sum

摘要: Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. 阅读全文

posted @ 2014-10-06 19:22 bug睡的略爽 阅读(131) 评论(0) 推荐(0) 编辑

Unique Paths I&&II

摘要: Unique Paths A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or r 阅读全文

posted @ 2014-10-06 19:07 bug睡的略爽 阅读(135) 评论(0) 推荐(0) 编辑

Insert Interval

摘要: Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary). You may assume that the intervals were initia 阅读全文

posted @ 2014-10-06 18:05 bug睡的略爽 阅读(118) 评论(0) 推荐(0) 编辑

Merge Intervals

摘要: Given a collection of intervals, merge all overlapping intervals. For example,Given [1,3],[2,6],[8,10],[15,18],return [1,6],[8,10],[15,18]. 合并重复区间 先让区 阅读全文

posted @ 2014-10-06 16:32 bug睡的略爽 阅读(112) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 ··· 12 下一页

导航