摘要: 弱智题。就是在做if语句的判断,最后输出的是一个数组。 3的倍数输出Fizz,5的倍数输出Buzz,同时为3和5的倍数输出FizzBuzz。例子, Example: n = 15, Return: [ "1", "2", "Fizz", "4", "Buzz", "Fizz", "7", "8", 阅读全文
posted @ 2020-03-25 13:35 CNoodle 阅读(182) 评论(0) 推荐(0)
摘要: Given two integers left and right that represent the range [left, right], return the bitwise AND of all numbers in this range, inclusive. Example 1: I 阅读全文
posted @ 2020-03-25 13:26 CNoodle 阅读(156) 评论(0) 推荐(0)
摘要: You are given two strings s and t. String t is generated by random shuffling string s and then add one more letter at a random position. Return the le 阅读全文
posted @ 2020-03-25 13:21 CNoodle 阅读(177) 评论(0) 推荐(0)
摘要: 这两题我放在一起说是因为思路一模一样,没什么值得研究的。思路都是用对数的换底公式去判断。 Reference, https://blog.csdn.net/qy20115549/article/details/52849280 JavaScript实现 1 /** 2 * @param {numbe 阅读全文
posted @ 2020-03-25 13:20 CNoodle 阅读(160) 评论(0) 推荐(0)
摘要: Given an integer n, return true if it is a power of two. Otherwise, return false. An integer n is a power of two, if there exists an integer x such th 阅读全文
posted @ 2020-03-25 13:19 CNoodle 阅读(157) 评论(0) 推荐(0)