Skip to content

Gopi Gorantala

Gopi is a software engineer with over 14 years of experience. He specializes in Java-based technology stack and has worked for various startups, the European government, and technology giants.

Members Public

Arithmetic and Logical Right Shifts

The logical right shift means shifting the bits to the right, and MSB(most significant bit) becomes 0. The arithmetic right shift means shifting the bits to the right, and MSB is the same as in the original number.

Members Public

Bitwise Left Shifts

The left-shift operator causes the bits in shift-expression to be shifted to the left by the number of positions specified by additive-expression. The bit positions that have been vacated by the shift operation are zero-filled.

Members Public

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 Public

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 Public

Solution Review: Single Number

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

Members Public

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 Public

Hamming Distance

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

Members Public

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 Public

Find Odd Occurring Element

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

Members Public

Swap Two Numbers

In this coding question, we input two numbers and swap them without using the swapping logic.