发布时间:2015-03-22 16:52:59
//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 tree {3,9,20,#,#,15,7},// 3// / \// 9 20// / \// 15 7//return .........【阅读全文】
发布时间:2015-03-22 16:52:12
//Given a binary tree, return the inorder traversal of its nodes' values.////For example://Given binary tree {1,#,2,3},// 1// \// 2// /// 3//return [1,3,2].////Note: Recursive solution is trivial, could you do it iteratively?import ja.........【阅读全文】
发布时间:2015-03-22 16:51:21
//Follow up for "Find Minimum in Rotated Sorted Array"://What if duplicates are allowed?////Would this affect the run-time complexity? How and why?//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 5 6 7 0 1 2).////Find the m.........【阅读全文】
发布时间:2015-03-22 16:50:28
import org.omg.CORBA.ARG_IN;//Given a positive integer, return its corresponding column title as appear in an Excel sheet.////For example://// 1 -> A// 2 -> B// 3 -> C// ...// 26 -> Z// 27 -> AA// &nb.........【阅读全文】
发布时间:2015-03-22 16:48:37
//A message containing letters from A-Z is being encoded to numbers using the following mapping:////'A' -> 1//'B' -> 2//...//'Z' -> 26//Given an encoded message containing digits, determine the total number of ways to decode it.////For example,//Given encoded message "12.........【阅读全文】