导航

上一页 1 2 3 4 5 6 ··· 12 下一页

2016年9月20日

摘要: 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. 题目要求:计算两个整型的和 阅读全文

posted @ 2016-09-20 23:35 CSU蛋李 阅读(131) 评论(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 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蛋李 阅读(84) 评论(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蛋李 阅读(95) 评论(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) 编辑

摘要: Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below 阅读全文

posted @ 2016-09-20 19:28 CSU蛋李 阅读(182) 评论(0) 推荐(0) 编辑

2016年9月19日

摘要: 这个题目我也没有思路,同学们可以查看这个http://www.cnblogs.com/NickyYe/p/4442867.html 下面是我改进后的代码 第一种方法: 第二种方法: 阅读全文

posted @ 2016-09-19 23:50 CSU蛋李 阅读(156) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 ··· 12 下一页