3. Add Two Numbers LinkedList You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes contains a single digit. Add … Read More

## 1235. Maximum Profit in Job Scheduling – Solution – Java

We have n jobs, where every job is scheduled to be done from startTime[i] to endTime[i], obtaining a profit of profit[i]. You’re given the startTime, endTime and profit arrays, return the maximum profit you can take such that there are no … Read More

## 735. Asteroid Collision – Leetcode – Java – Explanation

Problem statement We are given an array asteroids of integers representing asteroids in a row. For each asteroid, the absolute value represents its size, and the sign represents its direction (positive meaning … Read More

## Two Sum – LeetCode

1. Two Sum Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and … Read More

## Two sum problem | Solution

Problem: Two Sum | LeetCode Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would … Read More

## Max Area of Island | Leetcode 695

You are given an m x n binary matrix grid. An island is a group of 1‘s (representing land) connected 4-directionally (horizontal or vertical.) You may assume all four edges of the grid are surrounded by … Read More

## Leetcode – 164. Maximum Gap

Given an integer array nums, return the maximum difference between two successive elements in their sorted form. If the array contains less than two elements, return 0. You must write an algorithm that … Read More

## 14. Longest Common Prefix

Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string “”. Example 1: Input: strs = … Read More

## 283. Move Zeroes

Given an integer array nums, move all 0‘s to the end of it while maintaining the relative order of the non-zero elements. Note that you must do this in-place without making a copy … Read More

## 933. Number of Recent Calls

Problem statement: Number of Recent calls You have a RecentCounter class which counts the number of recent requests within a certain time frame. Implement the RecentCounter class: RecentCounter() Initializes the counter with zero recent requests. … Read More