摘要: 题目: 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 阅读全文
posted @ 2016-06-17 09:49 panini 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 题目: 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 阅读全文
posted @ 2016-06-15 10:43 panini 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 题目: 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 阅读全文
posted @ 2016-06-15 09:43 panini 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 题目: 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 阅读全文
posted @ 2016-06-14 10:56 panini 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 题目: 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 阅读全文
posted @ 2016-06-14 08:58 panini 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 题目: 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 阅读全文
posted @ 2016-06-14 08:24 panini 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 题目: 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 阅读全文
posted @ 2016-06-12 10:27 panini 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 题目: 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 阅读全文
posted @ 2016-06-12 09:46 panini 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 题目: Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules. The Sudoku board could be partially filled, where empty cells are filled 阅读全文
posted @ 2016-06-11 11:22 panini 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 题目: 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' 阅读全文
posted @ 2016-06-10 10:45 panini 阅读(158) 评论(0) 推荐(0) 编辑