原创 LeetCode之Depth-first Search題目彙總

Balanced Binary Tree Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced b

原创 LeetCode 300 Longest Increasing Subsequence

題目描述 Given an unsorted array of integers, find the length of longest increasing subsequence. For example, Given [10

原创 LeetCode之Trie題目彙總

Implement Trie (Prefix Tree) Implement a trie with insert, search, and startsWith methods. Note: You may assume th

原创 LeetCode之Math題目彙總

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

原创 LeetCode之Array題目彙總

Two Sum Given an array of integers, find two numbers such that they add up to a specific target number. The functio

原创 LeetCode之Breadth-first Search題目彙總

Binary Tree Level Order Traversal Given a binary tree, return the level order traversal of its nodes’ values. (ie,

原创 LeetCode之Dynamic Programming題目彙總

Best Time to Buy and Sell Stock Say you have an array for which the ith element is the price of a given stock on da

原创 LeetCode之Hash Table題目彙總

我的博客:http://blog.csdn.net/yano_nankai LeetCode題解:https://github.com/LjyYano/LeetCode Group Anagrams Given an array

原创 LeetCode之Binary Search題目彙總

Count Complete Tree Nodes Given a complete binary tree, count the number of nodes. Definition of a complete binary

原创 LeetCode之Divide and Conquer題目彙總

Different Ways to Add Parentheses Given a string of numbers and operators, return all possible results from computi

原创 LeetCode 033 Search in Rotated Sorted Array

題目描述 Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4

原创 LeetCode之String題目彙總

Count and Say The count-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221

原创 LeetCode之Graph題目彙總

Course Schedule There are a total of n courses you have to take, labeled from 0 to n - 1. Some courses may have pre

原创 LeetCode之Sort題目彙總

H-Index Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to

原创 LeetCode之Tree題目彙總

Balanced Binary Tree Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced b