LeetCode

LeetCode相关习题

0 已关注
55篇博文
• leetCode(55):Minimum Window Substring（limits.h头文件）

Given a string S and a string T, find the minimum window in S which will contain all the characters ...

2015-08-09 22:01
568
• leetCode(54):Gas Station

There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. ...

2015-08-06 10:09
421
• leetCode(53):Valid Anagram

Given two strings s and t, write a function to determine if t is an anagram of s. For example, s...

2015-08-05 15:25
362

Given two binary strings, return their sum (also a binary string). For example, a = "11" b = "1...

2015-07-28 23:03
411
• leetCode(51):Valid Palindrome

Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignori...

2015-07-25 11:56
550
• leetCode(50):Summary Ranges

Given a sorted integer array without duplicates, return the summary of its ranges. For example, giv...

2015-07-24 11:17
527
• leetCode(49):Count Primes

Description: Count the number of prime numbers less than a non-negative number, n. 判断一个数是否是质数主...

2015-07-24 09:58
527
• leetCode(48):Excel Sheet Column Number And Excel Sheet Column Title

Given a column title as appear in an Excel sheet, return its corresponding column number. For exa...

2015-07-24 08:51
509
• leetCode(47):Triangle

Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent n...

2015-07-22 20:03
478
• leetCode(46):Kth Smallest Element in a BST

Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. N...

2015-07-22 14:28
629
• leetCode(45):Min Stack

Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. ...

2015-07-20 08:34
504
• leetCode(44):Implement Stack using Queues

Implement the following operations of a stack using queues. push(x) -- Push element x onto stack....

2015-07-19 19:29
326
• leetCode(43):Product of Array Except Self

Given an array of n integers where n > 1, nums, return an array output such that output[i] is eq...

2015-07-19 19:02
526
• leetCode(42):Flatten Binary Tree to Linked List

Given a binary tree, flatten it to a linked list in-place. For example, Given 1 ...

2015-07-17 18:31
449
• leetCode(41):Convert Sorted Array to Binary Search Tree

Given an array where elements are sorted in ascending order, convert it to a height balanced BST. 取...

2015-07-17 17:03
439
• leetCode(40):Path Sum

Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all...

2015-07-17 16:46
650
• leetCode(39):Lowest Common Ancestor of a Binary Tree

Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. Accord...

2015-07-17 10:03
544
• leetCode(38):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 BS...

2015-07-16 14:48
635
• leetCode(37):Implement Queue using Stacks

Implement the following operations of a queue using stacks. push(x) -- Push element x to the back...

2015-07-14 08:42
551
• leetCode(36):Sum Root to Leaf Numbers

Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a numb...

2015-07-13 16:00
535