Frequently Asked Questions Calculate the Hamming Distance between two Integers Problem Statement Given two integers, calculate the hamming distance between them. Solution Explanation Hamming Distance between integers is defined as the number of indexes where the two bits differ. For example, given integers

Array Trapping Rain Water Solution Java Problem Statement Given an a list of n integers which are non negative and represent an elevation map of various buildings where the width of each bar/building is 1, Find out how

Array Find Two Numbers in an Array Which Sum Up to K Problem Statement Given an array of integers, find out two indices such that the sum of the numbers at that indices matches K. For example, {4, 6, 8, 1, 9} and K = 15,

Linked List Check if a LinkedList has a cycle Problem Statement Given a single linked list, verify if the list has a cycle. A linked list has a cycle if a node's reference points back to an earlier node in the chain.

Array Three Sum(3Sum) Leetcode Problem Statement Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the

Leetcode Easy Reverse a LinkedList Java Problem Statement Reverse a singly linked list. Given a single linked list, reverse it in place. Explanation Given a linked list like below, 1 -> 2 -> 3 -> 4