06 2016 档案

摘要:You are playing the following Bulls and Cows game with your friend: You write down a number and ask your friend to guess what the number is. Each time 阅读全文
posted @ 2016-06-21 17:21 lilixu 阅读(259) 评论(0) 推荐(0) 编辑
摘要:Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that there is a bijection between a lette 阅读全文
posted @ 2016-06-21 14:34 lilixu 阅读(158) 评论(0) 推荐(0) 编辑
摘要:Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The left subtree of a node contains only 阅读全文
posted @ 2016-06-20 15:33 lilixu 阅读(158) 评论(0) 推荐(0) 编辑
摘要: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 space fo 阅读全文
posted @ 2016-06-20 14:20 lilixu 阅读(107) 评论(0) 推荐(0) 编辑
摘要: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). For 阅读全文
posted @ 2016-06-01 17:29 lilixu 阅读(206) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2016-06-01 17:28 lilixu 阅读(142) 评论(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 is a 阅读全文
posted @ 2016-06-01 15:25 lilixu 阅读(160) 评论(0) 推荐(0) 编辑