bigpotato

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2018年3月20日

摘要: Given a non-negative integer n, count all numbers with unique digits, x, where 0 ≤ x < 10n. Example:Given n = 2, return 91. (The answer should be the 阅读全文
posted @ 2018-03-20 15:44 bigpotato 阅读(127) 评论(0) 推荐(0)

摘要: Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum pro 阅读全文
posted @ 2018-03-20 14:29 bigpotato 阅读(118) 评论(0) 推荐(0)

摘要: You are given an array x of n positive numbers. You start at point (0,0) and moves x[0] metres to the north, then x[1] metres to the west, x[2] metres 阅读全文
posted @ 2018-03-20 11:54 bigpotato 阅读(138) 评论(0) 推荐(0)

摘要: 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? 判断一个整数是否是3的次方 阅读全文
posted @ 2018-03-20 10:10 bigpotato 阅读(117) 评论(0) 推荐(0)

摘要: There are n bulbs that are initially off. You first turn on all the bulbs. Then, you turn off every second bulb. On the third round, you toggle every 阅读全文
posted @ 2018-03-20 00:27 bigpotato 阅读(127) 评论(0) 推荐(0)