摘要:
比较简单的思路:用map存放各个位的数字到罗马字符的映射 然后从个位依次遍历高位加上映射即可。 Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range f... 阅读全文
摘要:
Write an algorithm to determine if a number is “happy”.A happy number is a number defined by the following process: Starting with any positiv... 阅读全文
摘要:
Rotate an array of n elements to the right by k steps.For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3... 阅读全文