摘要: https://leetcode.com/problems/powx-n/ Implement pow(x, n), which calculates x raised to the power n (xn). Example 1: Example 2: Example 3: Note: -100. 阅读全文
posted @ 2018-11-15 21:16 丧心病狂工科女 阅读(374) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/guess-number-higher-or-lower/ We are playing the Guess Game. The game is as follows: I pick a number from 1 to n. You ha 阅读全文
posted @ 2018-11-15 17:41 丧心病狂工科女 阅读(126) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/power-of-two/ Given an integer, write a function to determine if it is a power of two. Example 1: Example 2: Example 3: 阅读全文
posted @ 2018-11-15 17:26 丧心病狂工科女 阅读(151) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/valid-anagram/ Given two strings s and t , write a function to determine if t is an anagram of s. Example 1: Example 2: 阅读全文
posted @ 2018-11-15 14:51 丧心病狂工科女 阅读(96) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/contains-duplicate/ Given an array of integers, find if the array contains any duplicates. Your function should return t 阅读全文
posted @ 2018-11-15 14:24 丧心病狂工科女 阅读(128) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/count-primes/ Count the number of prime numbers less than a non-negative number, n. Example: 代码: 阅读全文
posted @ 2018-11-15 14:13 丧心病狂工科女 阅读(163) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/happy-number/ Write an algorithm to determine if a number is "happy". A happy number is a number defined by the followin 阅读全文
posted @ 2018-11-15 09:41 丧心病狂工科女 阅读(157) 评论(0) 推荐(0) 编辑