Skip to content

Algorithms

Data Structures & Algorithms evaluate a candidate's problem-solving skills, coding proficiency, and understanding of computer science fundamentals. These questions often cover data structures, algorithms, system design, and programming concepts.

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.

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

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

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.

Members Public

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.

Members Public

Switch Sign of a Number

We make use of bit manipulation to solve this problem. using a NOT operator.