Home
Gaurav's GitHub Page
Cancel

Single Number III

Problem Description Given an integer array nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements that appear only once. You ca...

Introduction to Bit Manipulation - Part 4

Introduction to Bit Manipulation - Part 3

Introduction to Bit Manipulation - Part 2

Introduction to Bit Manipulation - Part 1

Counting Bits

This question is part of NeetCode150 series. Problem Description Given an integer n, return an array ans of length n + 1 such that for each i (0 <= i <= n), ans[i] is the number of 1’s in t...

Number of 1 Bits

This question is part of NeetCode150 series. Problem Description Write a function that takes an unsigned integer and returns the number of ‘1’ bits it has (also known as the Hamming weight). Not...

Longest Consecutive Sequence

This question is part of NeetCode150 series. Problem Description Given an unsorted array of integers nums, return the length of the longest consecutive elements sequence. You must write an algori...

Encode and Decode Strings

This question is part of NeetCode150 series. Problem Description Design an algorithm to encode a list of strings to a string. The encoded string is then sent over the network and is decoded back ...

Product of Array Except Self

This question is part of NeetCode150 series. Problem Description Given an integer array nums, return an array answer such that answer[i] is equal to the product of all the elements of nums except...