摘要: Given an integer, write an algorithm to convert it to hexadecimal. For negative integer, two’s complement method is used. Note: Example 1: Example 2: 阅读全文
posted @ 2019-08-24 14:57 fatttcat 阅读(136) 评论(0) 推荐(0) 编辑
摘要: Reverse bits of a given 32 bits unsigned integer. Example 1: Example 2: Note: Note that in some languages such as Java, there is no unsigned integer t 阅读全文
posted @ 2019-08-24 14:03 fatttcat 阅读(114) 评论(0) 推荐(0) 编辑
摘要: Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1. Examples: Note: You may assume the 阅读全文
posted @ 2019-08-24 13:29 fatttcat 阅读(82) 评论(0) 推荐(0) 编辑
摘要: The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Now your job is to find the total 阅读全文
posted @ 2019-08-24 02:54 fatttcat 阅读(119) 评论(0) 推荐(0) 编辑
摘要: The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integers x and y, calcul 阅读全文
posted @ 2019-08-24 02:33 fatttcat 阅读(111) 评论(0) 推荐(0) 编辑