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

Bitwise XOR, Computations, and Examples

A Bitwise XOR is a binary operation that takes two-bit patterns of equal length and performs the logical exclusive OR operation on each corresponding bits pair. Each position’s result is 0 if both bits are 0 or if both bits are 1. Otherwise, the result is 1.

Members Public

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.

Members Public

Solution Review: Power of 2

Let's solve this using brain kernighan's algorithm. This is optimized to O(1) time and space.

Members Public

Solution Review: Check If a Given Number is Even/Odd

This is a solution to another Bitwise question. Think of the rightmost bit of a number and think of some logic that could solve this. We solve using AND operator with O(1) time Complexity.

Members Public

Solution Review: Count Set Bits Or Number of 1 bit's

We saw an algorithm to solve this problem in the previous lesson. Let’s see how to solve this more efficiently using Briann’s Algorithm. This is a faster execution than the previous naive approach.

Members Public

A Complete Guide To JavaScript LocalStorage

localStorage is a property of the window object in JavaScript that allows you to store key/value pairs in a web browser. The data stored in localStorage persist even after the browser is closed, making it a useful tool for saving user data on the client side.

A Complete Guide To JavaScript LocalStorage
Members Public

Is Java "pass-by-reference" or "pass-by-value"?

Java uses pass-by-value for all parameters, including both primitive data types and objects, which affects how methods behave and how they should be written.

Members Public

How to reverse the letters in a string in Java

In this article, we'll learn various ways to reverse strings in Java. An algorithmic approach with a flow chart and steps. Using java API methods to solve this problem and rotate kth elements or characters in an array.

Reverse String
Members Public

Bitwise OR, Computations, and Examples

A Bitwise OR is a binary operator that takes two-bit patterns of equal length and performs the logical inclusive OR operation on each corresponding bits pair. The result in each position is 0 if both bits are 0. Otherwise, the result is 1.

Members Public

Number Of Flips Required To Make a|b Equal to c

We need to write a program with minimum flips to make the two bits’ OR operation equal a number. If you understand the OR operations clearly, this problem will be a good challenge for your skills.