摘要: Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maxim 阅读全文
posted @ 2017-06-21 13:22 Review->Improve 阅读(368) 评论(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. Given a m x n matrix, if an element is 0, set its entire 阅读全文
posted @ 2017-06-21 00:35 Review->Improve 阅读(173) 评论(0) 推荐(0) 编辑
摘要: Suppose you are at a party with n people (labeled from 0 to n - 1) and among them, there may exist one celebrity. The definition of a celebrity is tha 阅读全文
posted @ 2017-06-20 07:49 Review->Improve 阅读(422) 评论(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-06-20 05:26 Review->Improve 阅读(225) 评论(0) 推荐(0) 编辑
摘要: Given two strings S and T, determine if they are both one edit distance apart. There are three types of edits that can be performed on strings: insert 阅读全文
posted @ 2017-06-20 05:26 Review->Improve 阅读(575) 评论(0) 推荐(0) 编辑
摘要: Design an algorithm to encode a list of strings to a string. The encoded string is then sent over the network and is decoded back to the original list 阅读全文
posted @ 2017-06-18 06:01 Review->Improve 阅读(400) 评论(0) 推荐(0) 编辑
摘要: Suppose we abstract our file system by a string in the following manner: The string "dir\n\tsubdir1\n\tsubdir2\n\t\tfile.ext" represents: The director 阅读全文
posted @ 2017-06-17 04:59 Review->Improve 阅读(537) 评论(0) 推荐(0) 编辑
摘要: A mirror number is a number that looks the same when rotated 180 degrees (looked at upside down). Write a function to determine if a number is mirror. 阅读全文
posted @ 2017-06-17 04:21 Review->Improve 阅读(596) 评论(0) 推荐(0) 编辑
摘要: A child is running up a staircase with n steps, and can hop either 1 step, 2 steps, or 3 steps at a time. Implement a method to count how many possibl 阅读全文
posted @ 2017-06-07 01:05 Review->Improve 阅读(448) 评论(0) 推荐(0) 编辑
摘要: Given two rectangles, find if the given two rectangles overlap or not. Notice l1: Top Left coordinate of first rectangle.r1: Bottom Right coordinate o 阅读全文
posted @ 2017-06-07 00:43 Review->Improve 阅读(607) 评论(0) 推荐(1) 编辑