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) 编辑

导航