
ACM-位运算与高精度
文章平均质量分 58
LarryNLPIR
专注NLP/IR/Machine Learning/Data Mining
展开
-
LeetCode Single Number
Given an array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without using extra mem原创 2015-01-19 15:39:51 · 1348 阅读 · 0 评论 -
面试题:如何在一千万个不重复整数(电话号码)中查找某个特定数 位运算 bitmap
面试题:某城市有一千万个电话号码,如何快速找到某个电话号码,考虑优化时间和空间复杂度,同时考虑内存限制。同类变形:Given 2MB memory, we want to store 5 million integers in 0~10million range. These integers are unique.1. How to store these integers?2.Given a原创 2015-01-19 16:52:45 · 6029 阅读 · 2 评论 -
LeetCode Reverse Bits
Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return 964176192 (represented in binary as00111001011110原创 2015-06-22 14:51:15 · 3591 阅读 · 1 评论 -
LeetCode Number of 1 Bits
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 integer ’11' has binary representation 000000000000原创 2015-06-15 12:45:05 · 2290 阅读 · 0 评论