06 2016 档案
摘要:题目: Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example,"A man, a plan, a canal:
阅读全文
摘要:题目: Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transac
阅读全文
摘要:题目: Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3,Return [1,3,3,1]. 链接: http://leetcode.com/problems/pascals
阅读全文
摘要:题目: Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5,Return [ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1
阅读全文
摘要:题目: Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given su
阅读全文
摘要:题目: Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down to the neare
阅读全文
摘要:题目: 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
阅读全文
摘要:题目: Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).
阅读全文
摘要:题目: Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthe
阅读全文
摘要:题目: Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example:Given binary tre
阅读全文
摘要:题目: Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree is symmetric: 1 / \ 2
阅读全文
摘要:题目: Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identic
阅读全文
摘要:题目: Given two sorted integer arrays A and B, merge B into A as one sorted array. Note:You may assume that A has enough space (size that is greater or
阅读全文
摘要:题目: Given a sorted linked list, delete all duplicates such that each element appear only once. For example,Given 1->1->2, return 1->2.Given 1->1->2->3
阅读全文
摘要:题目: You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can yo
阅读全文
摘要:题目: Given two binary strings, return their sum (also a binary string). For example,a = "11"b = "1"Return "100". 链接: http://leetcode.com/problems/add-b
阅读全文
摘要:题目: Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most significant digit
阅读全文
摘要:题目: Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. If the last
阅读全文
摘要:题目: The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ... 1 is read off as "one 1" or 11.11 is read
阅读全文
摘要:题目: Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules. The Sudoku board could be partially filled, where empty cells are filled
阅读全文
摘要:题目: Given an array and a value, remove all instances of that value in place and return the new length. The order of elements can be changed. It doesn'
阅读全文
摘要:题目: Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra spac
阅读全文
摘要:题目: Given a linked list, swap every two adjacent nodes and return its head. For example,Given 1->2->3->4, you should return the list as 2->1->4->3. Yo
阅读全文
摘要:题目: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 链接:
阅读全文
摘要:题目: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in
阅读全文
摘要:题目: Given a linked list, remove the nth node from the end of list and return its head. For example, Note:Given n will always be valid.Try to do this i
阅读全文
摘要:题目: Write a function to find the longest common prefix string amongst an array of strings. 链接:http://leetcode.com/problems/longest-common-prefix/ 一刷:
阅读全文
摘要:题目: Determine whether an integer is a palindrome. Do this without extra space. click to show spoilers. Some hints: Could negative integers be palindro
阅读全文
浙公网安备 33010602011771号