上一页 1 ··· 23 24 25 26 27
摘要: Given an integer, write an algorithm to convert it to hexadecimal. For negative integer, two’s complement method is used. Note: 题目标签:Bit Manipulation 阅读全文
posted @ 2017-06-28 23:46 Jimmy_Cheng 阅读(321) 评论(0) 推荐(0) 编辑
摘要: We define a harmonious array is an array where the difference between its maximum value and its minimum value is exactly 1. Now, given an integer arra 阅读全文
posted @ 2017-06-28 04:03 Jimmy_Cheng 阅读(396) 评论(0) 推荐(0) 编辑
摘要: Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -. Example:Given a = 1 and b = 2, return 3. 题目标签:Bit Mani 阅读全文
posted @ 2017-06-28 02:38 Jimmy_Cheng 阅读(802) 评论(0) 推荐(0) 编辑
摘要: Given an integer (signed 32 bits), write a function to check whether it is a power of 4. Example:Given num = 16, return true. Given num = 5, return fa 阅读全文
posted @ 2017-06-26 23:35 Jimmy_Cheng 阅读(334) 评论(0) 推荐(0) 编辑
摘要: Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight). For example, the 32-bit 阅读全文
posted @ 2017-06-26 22:49 Jimmy_Cheng 阅读(211) 评论(0) 推荐(0) 编辑
摘要: Reverse bits of a given 32 bits unsigned integer. For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), retur 阅读全文
posted @ 2017-06-26 07:40 Jimmy_Cheng 阅读(350) 评论(0) 推荐(0) 编辑
摘要: Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] (si < ei), determine if a person could attend all mee 阅读全文
posted @ 2017-06-25 04:47 Jimmy_Cheng 阅读(863) 评论(0) 推荐(0) 编辑
摘要: Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i has a g 阅读全文
posted @ 2017-06-25 02:14 Jimmy_Cheng 阅读(1043) 评论(0) 推荐(0) 编辑
摘要: Given an m * n matrix M initialized with all 0's and several update operations. Operations are represented by a 2D array, and each operation is repres 阅读全文
posted @ 2017-06-24 08:51 Jimmy_Cheng 阅读(703) 评论(0) 推荐(0) 编辑
摘要: Suppose Andy and Doris want to choose a restaurant for dinner, and they both have a list of favorite restaurants represented by strings. You need to h 阅读全文
posted @ 2017-06-23 21:45 Jimmy_Cheng 阅读(411) 评论(0) 推荐(0) 编辑
上一页 1 ··· 23 24 25 26 27