摘要:
Problem : Given a non negative integer n, count all numbers with unique digits, x, where 0 ≤ x < 10n. Example: 思路 : Solution (C++) : 性能 : Runtime: 0 m 阅读全文
posted @ 2020-04-07 23:57
littledy
阅读(103)
评论(0)
推荐(0)
摘要:
Problem : Write a function that takes a string as input and reverse only the vowels of a string. Example 1: Example 2: Note: The vowels does not inclu 阅读全文
posted @ 2020-04-07 23:14
littledy
阅读(88)
评论(0)
推荐(0)
摘要:
Problem : 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 m 阅读全文
posted @ 2020-04-07 21:45
littledy
阅读(95)
评论(0)
推荐(0)
摘要:
Problem : Given a non empty array of integers, return the k most frequent elements. Example 1: Example 2: Note: You may assume k is always valid, 1 ≤ 阅读全文
posted @ 2020-04-07 16:58
littledy
阅读(95)
评论(0)
推荐(0)
摘要:
Problem : Write a function that reverses a string. The input string is given as an array of characters char[]. Do not allocate extra space for another 阅读全文
posted @ 2020-04-07 13:49
littledy
阅读(76)
评论(0)
推荐(0)
摘要:
Problem : Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representa 阅读全文
posted @ 2020-04-07 13:11
littledy
阅读(97)
评论(0)
推荐(0)
摘要:
Problem : Given an integer, write a function to determine if it is a power of three. Example 1: Example 2: Example 3: Example 4: Follow up: Could you 阅读全文
posted @ 2020-04-07 12:43
littledy
阅读(103)
评论(0)
推荐(0)
摘要:
Problem : Given an integer (signed 32 bits), write a function to check whether it is a power of 4. Example 1: Example 2: Follow up: Could you solve it 阅读全文
posted @ 2020-04-07 11:29
littledy
阅读(74)
评论(0)
推荐(0)