Ying

个人博客:http://smartsi.club/

LeetCode解题报告汇总

[LeetCode]1.Two Sum - Yoona - 博客频道 - CSDN.NET [LeetCode]2.Add Two Numbers - Yoona - 博客频道 - CSDN.NET [LeetCode]3.Longest Substring Without Repeating C...

2016-01-05 11:58:12

阅读数:2530

评论数:0

[LeetCode]5.Longest Palindromic Substring

题目Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique lon...

2015-08-28 23:08:01

阅读数:880

评论数:0

[LeetCode]228.Summary Ranges

题目Given a sorted integer array without duplicates, return the summary of its ranges.For example, given [0,1,2,4,5,7], return [“0->2”,”4->5”,”7”...

2015-08-04 20:51:01

阅读数:1284

评论数:0

[LeetCode]230.Kth Smallest Element in a BST

题目Given a binary search tree, write a function kthSmallest to find the kth smallest element in it.Note: You may assume k is always valid, 1 ≤ k ≤ B...

2015-08-03 11:34:23

阅读数:1250

评论数:0

[LeetCode]231.Power of Two

题目Given an integer, write a function to determine if it is a power of two.

2015-08-02 09:53:18

阅读数:1017

评论数:0

[LeetCode]240.Search a 2D Matrix II

题目Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:Integers in each row are sorted...

2015-08-01 15:14:39

阅读数:1082

评论数:0

[LeetCode]232.Implement Queue using Stacks

题目Implement the following operations of a queue using stacks.push(x) – Push element x to the back of queue. pop() – Removes the element from in fron...

2015-08-01 08:55:14

阅读数:1197

评论数:0

[LeetCode]238.Product of Array Except Self

题目Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements of nums e...

2015-07-31 16:45:28

阅读数:1111

评论数:0

[LeetCode]239.Sliding Window Maximum

题目Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k ...

2015-07-19 15:49:54

阅读数:1647

评论数:0

[LeetCode]233.Number of Digit One

题目Given an integer n, count the total number of digit 1 appearing in all non-negative integers less than or equal to n.For example: Given n = 13, R...

2015-07-19 10:53:41

阅读数:2030

评论数:0

[LeetCode]234.Palindrome Linked List

题目Given a singly linked list, determine if it is a palindrome.Follow up: Could you do it in O(n) time and O(1) space?思路利用双指针法找到链表中点位置,链表中点以后的的元素(不包括...

2015-07-18 16:03:22

阅读数:1421

评论数:0

[LeetCode]235.Lowest Common Ancestor of a Binary Search Tree

题目Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.According to the definition of LCA on Wikiped...

2015-07-14 09:02:10

阅读数:1405

评论数:0

[LeetCode]236.Lowest Common Ancestor of a Binary Tree

题目Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree.According to the definition of LCA on Wikipedia: “The low...

2015-07-13 16:43:09

阅读数:1432

评论数:0

[LeetCode]10.Regular Expression Matching

题目mplement regular expression matching with support for '.' and '*'.'.' Matches any single character. '*' Matches zero or more of the preceding eleme...

2015-07-07 15:41:02

阅读数:1143

评论数:0

[LeetCode]91.Decode Ways

A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A' -> 1 'B' -> 2 ... 'Z' -> 26 Given an enc...

2015-06-23 22:54:06

阅读数:1864

评论数:0

[LeetCode]65.Valid Number

Validate if a given string is numeric.Some examples: “0” => true ” 0.1 ” => true “abc” => false “1 a” => false “2e10” => true No...

2015-06-16 16:25:21

阅读数:1897

评论数:0

[LeetCode]93.Restore IP Addresses

题目Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example: Given “25525511135”,return ...

2015-05-15 23:15:01

阅读数:1697

评论数:0

[LeetCode]*85.Maximal Rectangle

题目Given a 2D binary matrix filled with 0’s and 1’s, find the largest rectangle containing all ones and return its area.思路对于上图的一个01矩阵。我们可以一行一行的分析,假设第三...

2015-05-14 20:48:47

阅读数:1349

评论数:0

[LeetCode]*84.Largest Rectangle in Histogram

题目Given n non-negative integers representing the histogram’s bar height where the width of each bar is 1, find the area of largest rectangle in the h...

2015-05-13 17:11:52

阅读数:1614

评论数:0

[LeetCode]139.Word Break

Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words.For ...

2015-05-07 17:17:10

阅读数:1724

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭