摘要: Shuffle a set of numbers without duplicates. Example: Runtime: 244 ms, faster than 36.91% of C++ online submissions for Shuffle an Array. 阅读全文
posted @ 2018-12-29 23:16 yuxihong 阅读(100) 评论(0) 推荐(0)
摘要: Given a non-negative integer n, count all numbers with unique digits, x, where 0 ≤ x < 10n. Example: Input: 2 Output: 91 Explanation: The answer shoul 阅读全文
posted @ 2018-12-29 16:49 yuxihong 阅读(135) 评论(0) 推荐(0)
摘要: In a group of N people (labelled 0, 1, 2, ..., N-1), each person has different amounts of money, and different levels of quietness. For convenience, w 阅读全文
posted @ 2018-12-29 16:14 yuxihong 阅读(209) 评论(0) 推荐(0)
摘要: Initially on a notepad only one character 'A' is present. You can perform two operations on this notepad for each step: Given a number n. You have to 阅读全文
posted @ 2018-12-29 14:37 yuxihong 阅读(183) 评论(0) 推荐(0)
摘要: Given a list of positive integers, the adjacent integers will perform the float division. For example, [2,3,4] -> 2 / 3 / 4. However, you can add any 阅读全文
posted @ 2018-12-29 14:10 yuxihong 阅读(124) 评论(0) 推荐(0)
摘要: There is a room with n lights which are turned on initially and 4 buttons on the wall. After performing exactly m unknown operations towards buttons, 阅读全文
posted @ 2018-12-29 14:03 yuxihong 阅读(143) 评论(0) 推荐(0)
摘要: A sequence of number is called arithmetic if it consists of at least three elements and if the difference between any two consecutive elements is the 阅读全文
posted @ 2018-12-29 13:45 yuxihong 阅读(112) 评论(0) 推荐(0)
摘要: In English, we have a concept called root, which can be followed by some other words to form another longer word - let's call this word successor. For 阅读全文
posted @ 2018-12-29 01:28 yuxihong 阅读(220) 评论(0) 推荐(0)