随笔分类 -  LeetCode

LeetCode解题随感、思路与总结。 欢迎大家评论、交流并拍砖。。
摘要:链接:https://leetcode.com/problems/maximal-rectangle/【描述】Given a 2D binary matrix filled with '0's and '1's, find the largest rectangle containing all o... 阅读全文
posted @ 2015-10-20 10:20 RockIt 阅读(4198) 评论(1) 推荐(0)
摘要:链接:https://leetcode.com/problems/set-matrix-zeroes/【描述】Given amxnmatrix, if an element is 0, set its entire row and column to 0. Do it in place.【中文描述】... 阅读全文
posted @ 2015-10-17 06:14 RockIt 阅读(341) 评论(0) 推荐(0)
摘要:链接:https://leetcode.com/problems/trapping-rain-water/【描述】Givennnon-negative integers representing an elevation map where the width of each bar is 1, c... 阅读全文
posted @ 2015-10-08 07:55 RockIt 阅读(546) 评论(0) 推荐(0)
摘要:链接:https://leetcode.com/problems/longest-valid-parentheses/【描述】Given a string containing just the characters'('and')', find the length of the longest ... 阅读全文
posted @ 2015-10-05 14:15 RockIt 阅读(488) 评论(0) 推荐(0)
摘要:链接: https://leetcode.com/problems/generate-parentheses/【描述】Givennpairs of parentheses, write a function to generate all combinations of well-formed pa... 阅读全文
posted @ 2015-09-30 13:08 RockIt 阅读(975) 评论(0) 推荐(0)
摘要:https://leetcode.com/problems/3sum-closest/【描述】Given an arraySofnintegers, find three integers inSsuch that the sum is closest to a given number, targ... 阅读全文
posted @ 2015-09-22 11:11 RockIt 阅读(415) 评论(0) 推荐(0)
摘要:https://leetcode.com/problems/regular-expression-matching/【描述】Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i... 阅读全文
posted @ 2015-09-20 12:42 RockIt 阅读(397) 评论(0) 推荐(0)
摘要:https://leetcode.com/problems/regular-expression-matching/【描述】Implement regular expression matching with support for'.'and'*'.'.' Matches any single c... 阅读全文
posted @ 2015-09-20 05:30 RockIt 阅读(317) 评论(0) 推荐(0)
摘要:【题目】LeetCode(9): Palindrome NumberURL: https://leetcode.com/problems/palindrome-number/【描述】Determine whether an integer is a palindrome. Do this witho... 阅读全文
posted @ 2015-09-15 06:39 RockIt 阅读(352) 评论(0) 推荐(0)
摘要:【题目】LeetCode(8): String to Integer (atoi)URL: https://leetcode.com/problems/string-to-integer-atoi/【描述】Implementatoito convert a string to an integer.... 阅读全文
posted @ 2015-09-14 14:28 RockIt 阅读(359) 评论(0) 推荐(0)
摘要:【题目】LeetCode(6): ZigZag ConversionURL: https://leetcode.com/problems/zigzag-conversion/【描述】The string"PAYPALISHIRING"is written in a zigzag pattern on... 阅读全文
posted @ 2015-09-14 03:59 RockIt 阅读(609) 评论(0) 推荐(0)
摘要:【题目】LeetCode(5): Longest Palindromic SubstringURL: https://leetcode.com/problems/longest-palindromic-substring/【描述】Given a stringS, find the longest p... 阅读全文
posted @ 2015-09-07 04:26 RockIt 阅读(212) 评论(0) 推荐(0)
摘要:【题目】LeetCode(2): Add Two NumbersURL: https://leetcode.com/problems/add-two-numbers/【描述】You are given two linked lists representing two non-negative nu... 阅读全文
posted @ 2015-09-05 09:55 RockIt 阅读(490) 评论(0) 推荐(0)
摘要:【题目】Two Sum【描述】Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indice... 阅读全文
posted @ 2015-09-05 09:24 RockIt 阅读(155) 评论(0) 推荐(0)
摘要:【题目】Median of Two Sorted Arrays【描述】There are two sorted arraysnums1andnums2of size m and n respectively. Find the median of the two sorted arrays. The... 阅读全文
posted @ 2015-09-05 08:50 RockIt 阅读(2137) 评论(1) 推荐(1)