Skip to content

Blog

Production error deep-dives — root cause, reproduction, and the fix that holds.

Members only

Introduction to Bit Shifting

A bit shift is a Bitwise operation where the order of a series of bits is moved, either to the left or right, to efficiently perform a mathematical operation.

Members only

Solution Review: Missing Number

We solved the problem using lookup (hashtable), using the mathematical formula. Let's solve this more efficiently using bit-level operations with XOR and then optimize the solution.

Members only

Solution Review: Single Number

Single Number coding question, can be easily solved with XOR bitwise technique with linear time complexity.

Members only

Challenge 1: Single Number

In this lesson, every element appears twice except one element. We solve this using naive, and then we move to solve it more optimally using XOR operator.

Members only

Hamming Distance

Hamming distance talks about two integers where the bit positions where the corresponding bits are different.

Members only

Detect If Two Integers Have Opposite Signs

In this question, input two numbers and detect if they have opposite signs. We solve using bitwise XOR operator

Members only

Find Odd Occurring Element

In this coding question, we find the odd-appearing element using bitwise xor. This algorithm is simple yet powerful.

Members only

Swap Two Numbers

Swap two numbers without the usual swapping logic: a coding question solved with bit manipulation, with a step-by-step explanation of how the approach works.

Members only

Bitwise XOR, Computations, and Examples

Learn the bitwise XOR operation: how it takes two bit patterns of equal length and performs a logical exclusive OR on each pair, with worked computations.

Members only

Introduction to XOR

The Bitwise XOR operator is denoted by ^. When an XOR gate is given with 2 inputs, the corresponding outputs will be: If two input bits are different, the output is 1. In all other cases, it is 0.