Home
Gaurav's GitHub Page
Cancel

Spiral Matrix

This question is part of NeetCode150 series. Problem Description Given an m x n matrix, return all elements of the matrix in spiral order. leetcode Solution Spiral Traversal class Solution { ...

Rotate Image

This question is part of NeetCode150 series. Problem Description You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise). You have to rotate the image ...

Reverse Integer

This question is part of NeetCode150 series. Problem Description Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the signed 32-bi...

Sum of Two Integers (Bit Manipulation)

This question is part of NeetCode150 series. Problem Description Given two integers a and b, return the sum of the two integers without using the operators + and -. leetcode Solution NeetCode ...

Minimum Interval to Include Each Query

PROBLEM DESCRIPTION Given an array of meeting time intervals intervals where intervals[i] = [starti, endi], return the minimum number of conference rooms required. leetcode SOLUTION BRUTE FORCE...

Meeting Rooms II

PROBLEM DESCRIPTION Given an array of meeting time intervals intervals where intervals[i] = [starti, endi], return the minimum number of conference rooms required. leetcode SOLUTION APPROACH 1 ...

Meeting Rooms

PROBLEM DESCRIPTION Given an array of meeting time intervals where intervals[i] = [starti, endi], determine if a person could attend all meetings. leetcode SOLUTION class Solution { public...

Non-overlapping Intervals

PROBLEM DESCRIPTION Given an array of intervals intervals where intervals[i] = [starti, endi], return the minimum number of intervals you need to remove to make the rest of the intervals non-overl...

Insert Interval

PROBLEM DESCRIPTION You are given an array of non-overlapping intervals intervals where intervals[i] = [starti, endi] represent the start and the end of the ith interval and intervals is sorted in...

Merge Intervals

PROBLEM DESCRIPTION Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals that cover all the interv...