随笔分类 -  Great Questions

摘要:Given an expression string array, return the Reverse Polish notation of this expression. (remove the parentheses) Given an expression string array, re 阅读全文
posted @ 2016-07-21 11:52 北叶青藤 阅读(306) 评论(0) 推荐(0)
摘要:Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two 阅读全文
posted @ 2016-07-21 02:46 北叶青藤 阅读(200) 评论(0) 推荐(0)
摘要:Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. Example Given 4 points: (1,2), (3,6), (0,0), (1,3) 阅读全文
posted @ 2016-07-21 01:28 北叶青藤 阅读(261) 评论(0) 推荐(0)
摘要:Given an array of n integer with duplicate number, and a moving window(size k), move the window at each iteration from the start of the array, find th 阅读全文
posted @ 2016-07-20 05:33 北叶青藤 阅读(160) 评论(0) 推荐(0)
摘要:Given two 32-bit numbers, N and M, and two bit positions, i and j. Write a method to set all bits between i and j in N equal to M (e g , M becomes a s 阅读全文
posted @ 2016-07-20 04:46 北叶青藤 阅读(227) 评论(0) 推荐(0)
摘要: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-20 04:04 北叶青藤 阅读(344) 评论(0) 推荐(0)
摘要:Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area. Given a 2D binary matrix filled with 阅读全文
posted @ 2016-07-19 13:28 北叶青藤 阅读(180) 评论(0) 推荐(0)
摘要:Given a 2D boolean matrix filled with False and True, find the largest rectangle containing all True and return its area. Given a 2D boolean matrix fi 阅读全文
posted @ 2016-07-19 11:20 北叶青藤 阅读(163) 评论(0) 推荐(0)
摘要:You are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise). You are given an n x n 2D matrix representing an im 阅读全文
posted @ 2016-07-19 07:29 北叶青藤 阅读(199) 评论(0) 推荐(0)
摘要:Given three strings: s1, s2, s3, determine whether s3 is formed by the interleaving of s1 and s2. Given three strings: s1, s2, s3, determine whether s 阅读全文
posted @ 2016-07-19 02:21 北叶青藤 阅读(172) 评论(0) 推荐(0)
摘要:Given a permutation which contains no repeated number, find its index in all the permutations of these numbers, which are ordered in lexicographical o 阅读全文
posted @ 2016-07-19 00:43 北叶青藤 阅读(332) 评论(0) 推荐(0)
摘要:Given n and k, return the k-th permutation sequence. Notice n will be between 1 and 9 inclusive. Given n and k, return the k-th permutation sequence. 阅读全文
posted @ 2016-07-18 12:57 北叶青藤 阅读(245) 评论(0) 推荐(0)
摘要:Word Ladder I Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that: Onl 阅读全文
posted @ 2016-07-18 07:03 北叶青藤 阅读(368) 评论(0) 推荐(0)
摘要:Given a 2D board containing 'X' and 'O', capture all regions surrounded by 'X'. A region is captured by flipping all 'O''s into 'X''s in that surround 阅读全文
posted @ 2016-07-18 05:43 北叶青藤 阅读(215) 评论(0) 推荐(0)
摘要:Find Minimum in Rotated Sorted Array I Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 阅读全文
posted @ 2016-07-17 22:15 北叶青藤 阅读(181) 评论(0) 推荐(0)
摘要:Integer to Roman Given an integer, convert it to a roman numeral. The number is guaranteed to be within the range from 1 to 3999. Integer to Roman Giv 阅读全文
posted @ 2016-07-16 23:04 北叶青藤 阅读(232) 评论(0) 推荐(0)
摘要:Given a string S and a string T, count the number of distinct subsequences of T in S. A subsequence of a string is a new string which is formed from t 阅读全文
posted @ 2016-07-16 11:39 北叶青藤 阅读(190) 评论(0) 推荐(0)
摘要:Given a string source and a string target, find the minimum window in source which will contain all the characters in target. Notice If there is no su 阅读全文
posted @ 2016-07-16 05:04 北叶青藤 阅读(385) 评论(0) 推荐(0)
摘要:Given an array of strings, return all groups of strings that are anagrams. Notice All inputs will be in lower-case Given an array of strings, return a 阅读全文
posted @ 2016-07-16 00:22 北叶青藤 阅读(217) 评论(0) 推荐(0)
摘要:Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and put. get(key) - Get the 阅读全文
posted @ 2016-07-15 22:48 北叶青藤 阅读(380) 评论(0) 推荐(0)