上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 48 下一页
摘要: Given an array of integers, every element appears three times except for one, which appears exactly once. Find that single one. Note:Your algorithm sh 阅读全文
posted @ 2017-10-25 11:12 daniel456 阅读(93) 评论(0) 推荐(0) 编辑
摘要: Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation. Note: Example 1: Exa 阅读全文
posted @ 2017-10-25 11:06 daniel456 阅读(121) 评论(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 @ 2017-10-25 11:04 daniel456 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 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 @ 2017-10-25 11:02 daniel456 阅读(111) 评论(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. 含义:不用加减运算符,计算 阅读全文
posted @ 2017-10-25 10:55 daniel456 阅读(75) 评论(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-10-25 10:52 daniel456 阅读(102) 评论(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-10-25 10:31 daniel456 阅读(85) 评论(0) 推荐(0) 编辑
摘要: Reverse bits of a given 32 bits unsigned integer. For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), retur 阅读全文
posted @ 2017-10-25 10:30 daniel456 阅读(79) 评论(0) 推荐(0) 编辑
摘要: Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, *, /. Each operand may be an integer or another e 阅读全文
posted @ 2017-10-25 10:24 daniel456 阅读(127) 评论(0) 推荐(0) 编辑
摘要: Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) -- Push element x onto stack. pop() -- Remov 阅读全文
posted @ 2017-10-25 10:20 daniel456 阅读(148) 评论(0) 推荐(0) 编辑
上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 48 下一页