Tagged articles
bit-manipulation
13 articles · Page 1 of 1
A large OTA platform eliminated sharding query latency by encoding a 4-bit routeKey into 64-bit Snowflake order IDs, enabling direct shard lookup without index table queries, reducing P99 latency from over 1 second to tens of milliseconds and cutting database load by 80% through a three-layer fallback strategy.
RoutingShardingSnowflake
0 likes · 20 min read

The article explains how a binary‑encoding strategy lets you identify a single poisoned bottle out of 1000 using only ten mice by assigning each mouse to a bit position, sampling wines accordingly, and interpreting the death pattern as a 10‑bit address.
BitmapBloom Filterbinary
0 likes · 7 min read

The author shares a workplace frustration about unfair performance metrics, then illustrates how a hidden 1024‑byte boundary bug led to a discussion of the classic “power‑of‑two” problem, providing clear bit‑wise logic, edge‑case handling, and ready‑to‑run Java code for detecting powers of two.
AlgorithmJavaPower of Two
0 likes · 6 min read

This article presents a curated collection of nine high‑utility C code snippets for embedded development, covering a circular buffer, custom assertions, bit reversal, fixed‑point arithmetic, endianness conversion, bit masks, timer handling, binary search, and a simple bitset structure, each with concise explanations and ready‑to‑use implementations.
Fixed-PointTimerbinary search
0 likes · 6 min read

This article explains why bit manipulation is a staple technique in computer science, detailing performance gains, state flag encoding, mask operations, data compression, cryptography, image processing, hash structures, binary counting, and algorithm design, with practical Go examples.
Data CompressionGobit-manipulation
0 likes · 3 min read

This article presents a curated collection of high‑impact C utility code examples—including a circular buffer, assertion macro, bit‑reversal function, fixed‑point arithmetic, endianness conversion, bit masks, timer handling, binary search, and a simple bitset—explaining their purpose and showing ready‑to‑use implementations for embedded systems.
C++Code SamplesEmbedded
0 likes · 7 min read

This article presents nine powerful C utility code examples—including a circular buffer, custom assertions, bit reversal, fixed‑point arithmetic, endianness conversion, bit masks, timer handling, binary search, and a simple bitset—explaining their purpose and demonstrating how they can improve performance and maintainability in embedded system development.
C++Embeddedbit-manipulation
0 likes · 7 min read

This article explains the fundamentals of bitwise operations in C, covering their advantages, operator symbols, precedence, common tricks such as parity checks, power‑of‑two tests, swapping values, bit masks, and includes numerous code snippets and practical examples for efficient low‑level programming.
algorithm tricksbit-manipulationbitwise
0 likes · 13 min read

This article explains a classic interview puzzle where ten mice and a two‑hour observation window are used to identify a single toxic bottle out of a thousand by encoding the bottles in binary and interpreting the mice's survival as binary bits.
Algorithmbinarybit-manipulation
0 likes · 6 min read

This article provides a detailed introduction to Java's seven bitwise operators, explains their binary logic, demonstrates shift operations, and showcases common practical uses such as power-of-two multiplication and parity checks with clear code examples and visual illustrations.
Javabit-manipulationbitwise-operators
0 likes · 9 min read

This article introduces the basics of bitwise operations, common operators, practical tricks such as checking parity, setting or clearing bits, and demonstrates their use in solving classic algorithmic challenges like the poison bottle puzzle, power‑of‑two detection, counting set bits, and the 8‑Queens problem.
Algorithmbit-manipulationbitwise
0 likes · 17 min read

This article reviews several practical algorithm tricks—including using n&(n‑1) to clear the lowest set bit, counting bits, converting numbers, applying double‑pointer methods to linked lists and sorted arrays, and leveraging XOR properties—to simplify typical interview coding problems.
Algorithmbit-manipulationtwo pointers
0 likes · 9 min read


ITPUBApr 24, 2017 · Fundamentals
This article provides a concise reference of core algorithms—including sorting methods, graph traversals, shortest‑path techniques, greedy strategies, bit‑level manipulations, and asymptotic notation—detailing their stability, time complexities, key concepts, and practical examples for interview preparation.
AlgorithmsComplexityGraph Algorithms
0 likes · 8 min read
