上一页 1 2 3 4 5 6 ··· 9 下一页
摘要: Remove Duplicates from Sorted Array II Follow up for "Remove Duplicates":What if duplicates are allowed at most twice? For example,Given sorted array  阅读全文
posted @ 2017-03-04 14:21 notesbuddy 阅读(133) 评论(0) 推荐(0) 编辑
摘要: Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, 阅读全文
posted @ 2017-03-03 19:27 notesbuddy 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 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 @ 2017-03-03 19:00 notesbuddy 阅读(191) 评论(0) 推荐(0) 编辑
摘要: Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place. Follow up: Did you use extra space?A straight forward so 阅读全文
posted @ 2017-03-03 17:50 notesbuddy 阅读(245) 评论(0) 推荐(0) 编辑
摘要: Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.) You have 阅读全文
posted @ 2017-03-03 17:14 notesbuddy 阅读(157) 评论(0) 推荐(0) 编辑
摘要: You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you cl 阅读全文
posted @ 2017-03-03 17:00 notesbuddy 阅读(265) 评论(0) 推荐(0) 编辑
摘要: Given two binary strings, return their sum (also a binary string). For example,a = "11"b = "1"Return "100". tag: 字符asc码 。字符和数字加减法 。 '1' - '0' = 1 . '1 阅读全文
posted @ 2017-02-28 19:49 notesbuddy 阅读(237) 评论(0) 推荐(0) 编辑
摘要: Given a non-negative integer represented as a non-empty array of digits, plus one to the integer. You may assume the integer do not contain any leadin 阅读全文
posted @ 2017-02-28 15:56 notesbuddy 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 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 @ 2017-02-28 15:38 notesbuddy 阅读(121) 评论(0) 推荐(0) 编辑
摘要: Given a list, rotate the list to the right by k places, where k is non-negative. For example:Given 1->2->3->4->5->NULL and k = 2,return 4->5->1->2->3- 阅读全文
posted @ 2017-02-28 15:27 notesbuddy 阅读(126) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 9 下一页