摘要: Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol ValueI 1V 5X 10L 50C 100D 500M 1000For example, two is writt 阅读全文
posted @ 2020-02-06 19:36 SteveYu 阅读(92) 评论(0) 推荐(0) 编辑
摘要: Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward. Example 1: Input: 121Output: true 阅读全文
posted @ 2020-02-06 18:58 SteveYu 阅读(95) 评论(0) 推荐(0) 编辑
摘要: Given a 32-bit signed integer, reverse digits of an integer. Example 1: Input: 123Output: 321Example 2: Input: -123Output: -321Example 3: Input: 120Ou 阅读全文
posted @ 2020-02-06 18:42 SteveYu 阅读(83) 评论(0) 推荐(0) 编辑
摘要: Sherlock Holmes received a note with some strange strings: Let's date! 3485djDkxh4hhGE 2984akDfkkkkggEdsb s&hgsfdk d&Hyscvnm. It took him only a minut 阅读全文
posted @ 2020-02-06 16:59 SteveYu 阅读(168) 评论(0) 推荐(0) 编辑
摘要: Given any positive integer N, you are supposed to find all of its prime factors, and write them in the format N = p​1​​​k​1​​​​×p​2​​​k​2​​​​×⋯×p​m​​​ 阅读全文
posted @ 2020-02-06 16:07 SteveYu 阅读(212) 评论(0) 推荐(0) 编辑
摘要: The task of this problem is simple: insert a sequence of distinct positive integers into a hash table, and output the positions of the input numbers. 阅读全文
posted @ 2020-02-06 14:48 SteveYu 阅读(157) 评论(0) 推荐(0) 编辑
摘要: Given any permutation of the numbers {0, 1, 2,..., N−1}, it is easy to sort them in increasing order. But what if Swap(0, *) is the ONLY operation tha 阅读全文
posted @ 2020-02-06 14:15 SteveYu 阅读(134) 评论(0) 推荐(0) 编辑
摘要: Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which cou 阅读全文
posted @ 2020-02-06 13:26 SteveYu 阅读(155) 评论(0) 推荐(0) 编辑