posted @ 2016-09-20 23:35 CSU蛋李 阅读(131) 评论(0) 推荐(0) 编辑
摘要:
Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -. Example:Given a = 1 and b = 2, return 3. 题目要求:计算两个整型的和 阅读全文
摘要:
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 elemen 阅读全文
posted @ 2016-09-20 23:02 CSU蛋李 阅读(114) 评论(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 element i 阅读全文
posted @ 2016-09-20 22:56 CSU蛋李 阅读(101) 评论(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:Given s 阅读全文
posted @ 2016-09-20 22:39 CSU蛋李 阅读(170) 评论(0) 推荐(0) 编辑
摘要:
Write a function that takes a string as input and returns the string reversed. Example:Given s = "hello", return "olleh". 把前后相应的位置调换就行了 阅读全文
posted @ 2016-09-20 21:58 CSU蛋李 阅读(85) 评论(0) 推荐(0) 编辑
摘要:
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 fa 阅读全文
posted @ 2016-09-20 21:50 CSU蛋李 阅读(96) 评论(0) 推荐(0) 编辑
摘要:
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font 阅读全文
posted @ 2016-09-20 21:15 CSU蛋李 阅读(139) 评论(0) 推荐(0) 编辑
摘要:
Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 click to show spoilers. Have you thought about this? Here a 阅读全文
posted @ 2016-09-20 19:55 CSU蛋李 阅读(101) 评论(0) 推荐(0) 编辑