摘要: Description:Implement the following operations of a queue using stacks.push(x) -- Push element x to the back of queue.pop() -- Removes the element fro... 阅读全文
posted @ 2015-08-23 11:13 Rosanne 阅读(165) 评论(0) 推荐(0) 编辑
摘要: Description:Given a binary tree, return all root-to-leaf paths.For example, given the following binary tree: 1 / \2 3 \ 5All root-to-leaf pat... 阅读全文
posted @ 2015-08-23 10:31 Rosanne 阅读(187) 评论(0) 推荐(0) 编辑
摘要: Description:Given an array of numbersnums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the tw... 阅读全文
posted @ 2015-08-23 10:13 Rosanne 阅读(137) 评论(0) 推荐(0) 编辑
摘要: Description:Write a program to check whether a given number is an ugly number.Ugly numbers are positive numbers whose prime factors only include2, 3, ... 阅读全文
posted @ 2015-08-23 09:47 Rosanne 阅读(133) 评论(0) 推荐(0) 编辑