Blog
Production error deep-dives — root cause, reproduction, and the fix that holds.
Introduction to OR Operator
Learn the bitwise OR operator: how it compares each bit of two operands and when the result is 0 or 1, with clear examples of the computation in binary.
Challenge 3: Power of 2
We solve by making use of the & operator in computers. There are many ways to solve this, of which two approaches are simple, and one is a more complex but better solution.
Twitter Registration: Single Responsibility Principle
We design Twitter registration software with the help of the single responsibility principle that contains a notification service, database repository, account service, and execution class.
Introduction to Bit Manipulation
In order to ace coding interviews for tech companies, it is necessary to understand Bitwise operators, which are usually fast compared to arithmetic and other math operations.
Switch Sign of a Number
Learn how to switch the sign of a number with bit manipulation, using the NOT operator to solve the problem, with a clear explanation of how it works.
Subsets Or Powerset
In subsets or powerset problem, we need to write a program that finds all possible subsets (the power set) of a given input. The solution set must not contain duplicate elements.
Challenge 2: Check If a Given Number is Even/Odd
This is an example of another Bitwise question. Think of the rightmost bit of a number and think of some logic that could solve this.
Counting Bits II
This is an extension to the counting set bits problem, counting the number of set bits or 1's present in a number. In here we see solutions in Java, JavaScript, Cpp, and TypeScript.
Challenge 1: Count Set Bits Or Number of 1 bit's
This is a traditional problem counting the number of set bits or 1's present in a number. Let’s see how we can count the set bits using the AND operator.
Bitwise AND, Computations, and Examples
Learn the bitwise AND operation: how it takes two equal-length binary values and performs a logical AND on each pair of bits, with worked computations.