03 2016 档案
摘要: Subscribe to see which companies asked this question
阅读全文
摘要:For example, this binary tree is symmetric: But the following is not: Note:Bonus points if you could solve it both recursively and iteratively. co
阅读全文
摘要:Note: Subscribe to see which companies asked this question
阅读全文
摘要:Note:You may assume that duplicates do not exist in the tree. Subscribe to see which companies asked this question
阅读全文
摘要:Note:You may assume that duplicates do not exist in the tree. Subscribe to see which companies asked this question
阅读全文
摘要:Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a binary tree in which the dept
阅读全文
摘要:Problem: You have a n x n grid: 2 4 3 1 3 2 1 4 4 2 3 1 1 2 3 4 You have to start at the bottom row (highlighted red) and make your way to the top row
阅读全文
摘要:15. 3Sum Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives th
阅读全文
摘要:Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have ex
阅读全文
摘要:332. Reconstruct Itinerary Given a list of airline tickets represented by pairs of departure and arrival airports [from, to], reconstruct the itinerar
阅读全文
摘要:380. Insert Delete GetRandom O(1) Design a data structure that supports all following operations in average O(1) time. insert(val): Inserts an item va
阅读全文
摘要:207. Course Schedule 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 tak
阅读全文
摘要:131. Palindrome Partitioning Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome
阅读全文
摘要:133. Clone Graph Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors. OJ's undirected graph serialization:
阅读全文
摘要:102. Binary Tree Level Order Traversal Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by l
阅读全文

浙公网安备 33010602011771号