随笔分类 -  LeetCode

上一页 1 ··· 48 49 50 51 52 53 54 55 56 ··· 61 下一页
摘要:Find the total area covered by two rectilinearrectangles in a 2D plane. Each rectangle is defined by its bottom left corner and top right corner as sh 阅读全文
posted @ 2015-06-09 12:56 Grandyang 阅读(10799) 评论(4) 推荐(0) 编辑
摘要:Given a 2D board containing 'X' and 'O'(the letter O), capture all regions surrounded by 'X'. A region is captured by flipping all 'O's into 'X's in t 阅读全文
posted @ 2015-06-05 23:55 Grandyang 阅读(22607) 评论(26) 推荐(0) 编辑
摘要:Given an m x n binary matrix filled with 0's and 1's, find the largest square containing only 1's and return its area. Example 1: Input: matrix = [["1 阅读全文
posted @ 2015-06-03 23:22 Grandyang 阅读(27680) 评论(16) 推荐(0) 编辑
摘要:Given two words (beginWord and endWord), and a dictionary's word list, find all shortest transformation sequence(s) from beginWord to endWord, such th 阅读全文
posted @ 2015-06-03 02:31 Grandyang 阅读(26572) 评论(14) 推荐(0) 编辑
摘要:Given an array of integers, find out whether there are two distinct indices i and j in the array such that the difference between nums[i] and nums[j] 阅读全文
posted @ 2015-06-01 23:33 Grandyang 阅读(26123) 评论(16) 推荐(0) 编辑
摘要:A transformation sequence from word beginWord to word endWord using a dictionary wordList is a sequence of words beginWord -> s1 -> s2 -> ... -> sk su 阅读全文
posted @ 2015-05-30 07:06 Grandyang 阅读(27518) 评论(19) 推荐(3) 编辑
摘要:Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element. Example 阅读全文
posted @ 2015-05-30 04:10 Grandyang 阅读(35765) 评论(26) 推荐(2) 编辑
摘要:Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the  阅读全文
posted @ 2015-05-30 00:06 Grandyang 阅读(18243) 评论(11) 推荐(0) 编辑
摘要:Find all possible combinations of k numbers that add up to a number n, given that only numbers from 1 to 9 can be used and each combination should be 阅读全文
posted @ 2015-05-29 11:04 Grandyang 阅读(14171) 评论(0) 推荐(2) 编辑
摘要:Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the arr... 阅读全文
posted @ 2015-05-28 21:40 Grandyang 阅读(15830) 评论(3) 推荐(0) 编辑
摘要:A city's skyline is the outer contour of the silhouette formed by all the buildings in that city when viewed from a distance. Now suppose you are give 阅读全文
posted @ 2015-05-27 22:24 Grandyang 阅读(26948) 评论(10) 推荐(1) 编辑
摘要:Given a string s, you are allowed to convert it to a palindrome by adding characters in front of it. Find and return the shortest palindrome you can f 阅读全文
posted @ 2015-05-23 03:09 Grandyang 阅读(28558) 评论(13) 推荐(2) 编辑
摘要:You are given a string s and an array of strings words. All the strings of words are of the same length. A concatenated substring in s is a substring 阅读全文
posted @ 2015-05-22 00:07 Grandyang 阅读(23498) 评论(11) 推荐(0) 编辑
摘要:You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed. All houses at this place are ar 阅读全文
posted @ 2015-05-21 03:26 Grandyang 阅读(25918) 评论(10) 推荐(1) 编辑
摘要:Given an m x n board of characters and a list of strings words, return all words on the board. Each word must be constructed from letters of sequentia 阅读全文
posted @ 2015-05-20 00:06 Grandyang 阅读(22132) 评论(10) 推荐(0) 编辑
摘要:Given an array nums of n integers, return an array of all the unique quadruplets [nums[a], nums[b], nums[c], nums[d]] such that: 0 <= a, b, c, d < n a 阅读全文
posted @ 2015-05-19 23:28 Grandyang 阅读(36787) 评论(16) 推荐(2) 编辑
摘要:Given an integer array nums of length n and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of t 阅读全文
posted @ 2015-05-18 02:24 Grandyang 阅读(27377) 评论(2) 推荐(1) 编辑
摘要:Design a data structure that supports the following two operations: search(word) can search a literal word or a regular expression string containing o 阅读全文
posted @ 2015-05-16 05:59 Grandyang 阅读(17264) 评论(6) 推荐(1) 编辑
摘要:There are a total of n courses you have to take, labeled from 0 to n-1. Some courses may have prerequisites, for example to take course 0 you have to 阅读全文
posted @ 2015-05-14 23:19 Grandyang 阅读(20639) 评论(0) 推荐(0) 编辑
摘要:Given an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarray of which the sum ≥ s. If there isn't 阅读全文
posted @ 2015-05-13 22:37 Grandyang 阅读(30385) 评论(18) 推荐(0) 编辑

上一页 1 ··· 48 49 50 51 52 53 54 55 56 ··· 61 下一页
Fork me on GitHub