随笔分类 -  LeetCode

上一页 1 ··· 48 49 50 51 52 53 54 55 56 ··· 61 下一页
摘要: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 阅读(27461) 评论(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 阅读(26413) 评论(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 阅读(26062) 评论(16) 推荐(0) 编辑
摘要:Given two words (beginWord and endWord), and a dictionary's word list, find the length of shortest transformation sequence from beginWord to endWord, 阅读全文
posted @ 2015-05-30 07:06 Grandyang 阅读(27252) 评论(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 阅读(35399) 评论(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 阅读(18183) 评论(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 阅读(14098) 评论(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 阅读(15764) 评论(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 阅读(26839) 评论(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 阅读(28279) 评论(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 阅读(23316) 评论(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 阅读(25738) 评论(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 阅读(21921) 评论(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 阅读(36428) 评论(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 阅读(27227) 评论(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 阅读(17141) 评论(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 阅读(20438) 评论(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 阅读(30146) 评论(18) 推荐(0) 编辑
摘要:Implement a trie with insert, search, and startsWith methods. Example: Note: You may assume that all inputs are consist of lowercase letters a-z. All 阅读全文
posted @ 2015-05-10 06:32 Grandyang 阅读(23349) 评论(14) 推荐(0) 编辑
摘要: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-07 13:01 Grandyang 阅读(44057) 评论(26) 推荐(0) 编辑

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