- 博客(6)
- 收藏
- 关注
原创 [Leetcode]Power of Four
Given an integer (signed 32 bits), write a function to check whether it is a power of 4. Example: Given num = 16, return true.Given num = 5, return false. Follow up: Could you solve it without loop
2016-06-24 15:31:12 273
原创 [Leetcode]Reverse Vowels of a String
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: Given s = "leetcode", return "leotcede". Subscrib
2016-06-23 15:04:16 203
原创 [Leetcode]Power of Three
Given an integer, write a function to determine if it is a power of three. Follow up: Could you do it without using any loop / recursion? Credits: Special thanks to @dietpepsi for adding this pr
2016-06-23 11:14:00 253
原创 [Leetcode]Intersection of Two Arrays II
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 element in the result should appear as many ti
2016-06-21 12:23:53 332
原创 [Leetcode]Intersection of Two Arrays
Given two arrays, write a function to compute their intersection. Example: Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2]. Note: Each element in the result must be unique.The result c
2016-06-20 18:37:36 235
原创 [Leetcode]Nim Game
You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 stones. The one who removes the last stone will be the
2016-06-20 18:27:20 245
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人