摘要: 题目: We are playing the Guess Game. The game is as follows: I pick a number from 1 to n. You have to guess which number I picked. Every time you guess 阅读全文
posted @ 2016-08-02 14:05 绵绵思远道 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 题目: Write a function that takes a string as input and reverse only the vowels of a string. Example 1:Given s = "hello", return "holle". Example 2:Give 阅读全文
posted @ 2016-08-02 13:49 绵绵思远道 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 题目: Given two arrays, write a function to compute their intersection. Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2, 2]. Note: Each el 阅读全文
posted @ 2016-08-02 13:23 绵绵思远道 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 题目: Given two arrays, write a function to compute their intersection. Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2]. Note: Each eleme 阅读全文
posted @ 2016-08-02 11:57 绵绵思远道 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a binary tree, return all root-to-leaf paths. For example, given the following binary tree: All root-to-leaf paths are: 阅读全文
posted @ 2016-08-02 11:12 绵绵思远道 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 题目: Description: Count the number of prime numbers less than a non-negative number, n. Credits:Special thanks to @mithmatt for adding this problem and 阅读全文
posted @ 2016-08-02 10:57 绵绵思远道 阅读(158) 评论(0) 推荐(0) 编辑