Garvit Khamesra

Garvit Khamesra @garvit_khamesra

Joined:
Jun 13, 2025

Garvit Khamesra
articles - 16 total

Python Cheat Sheet: The Basics

Python Cheat Sheet: The Basics A quick reference for Python fundamentals, ideal for Data Science,...

Learn More 2 2Aug 30

Java Interview Questions - Part 3

Part 3 of the Java interview question series. In this, we will cover Let's get started Q31: What...

Learn More 0 0Aug 27

Code 101: Tower of Hanoi

Question: Towers of Hanoi: In the classic problem of the Towers of Hanoi, you have 3 towers and N...

Learn More 0 0Aug 27

Code 101: K-th Symbol in Grammar

Question We build a table of n rows (1-indexed). We start by writing 0 in the 1st row. Now in every...

Learn More 1 0Aug 27

Code 101: Number of Islands

Question: Given an m x n 2D binary grid which represents a map of '1's (land) and '0's (water),...

Learn More 0 0Aug 27

Code 101: Swap Nodes in Pairs

Question: Given a linked list, swap every two adjacent nodes and return its head. You must solve the...

Learn More 5 0Aug 27

Code 101: Rat in a Maze

Question: Consider a rat placed at (0, 0) in a square matrix of order N * N. It has to reach the...

Learn More 5 0Aug 27

Code 101: Sort a Stack using Recursion

Question: Given a stack, sort it using recursion. Use of any loop constructs like while, for..etc is...

Learn More 0 1Aug 27

Code 101: Sort an Array using Recursion

Question: Given an array of integers nums, sort the array in ascending order.   Example 1: Input:...

Learn More 0 0Aug 27

Java Interview Questions - Part 2

Part 2 of the [Java interview question...

Learn More 0 0Aug 26

Static Keyword in Java

Static Keyword We can use the Static keyword in 5 places. Import...

Learn More 0 0Aug 26

Code 101: Longest Valid Parentheses ( LeetCode Hard Problem )

Question: Given a string containing just the characters '(' and ')', find the length of the longest...

Learn More 0 0Aug 26

Code 101: Single Number II (LeetCode Medium Problem)

Question: Given an integer array nums where every element appears three times except for one, which...

Learn More 0 0Aug 26

Java Interview Questions — Part 1

In these kinds of posts, the questions and the answers remain almost the same, the difference lies in...

Learn More 7 0Jun 30

How to create an Immutable Class in Java?

Immutable Classes Immutable classes are those whose object once created will not change its value....

Learn More 0 0Jun 30

Final Keyword in Java

Final Keyword The final keyword in java is used to restrict the user. It can be used...

Learn More 0 0Jun 30