Problem Description Given an array of integers heights representing the histogram’s bar height where the width of each bar is 1, return the area of the largest rectangle in the histogram. leetcod...
Car Fleet
PROBLEM DESCRIPTION There are n cars going to the same destination along a one-lane road. The destination is target miles away. You are given two integer array position and speed, both of length ...
Daily Temperatures
PROBLEM DESCRIPTION Given an array of integers temperatures represents the daily temperatures, return an array answer such that answer[i] is the number of days you have to wait after the ith day t...
Generate Parentheses
Problem Description Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. leetcode Solution NeetCode Youtube class Solution { public List...
Determine if Two Strings Are Close
Problem Description Two strings are considered close if you can attain one from the other using the following operations: Operation 1: Swap any two existing characters. For example, abcd...
Evaluate Reverse Polish Notation
Problem Description Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, *, and /. Each operand may be an integer or another expression. Note that...
Graph Valid Tree
Problem Description You have a graph of n nodes labeled from 0 to n - 1. You are given an integer n and a list of edges where edges[i] = [ai, bi] indicates that there is an undirected edge between...
Clone Graph
Problem Description Given a reference of a node in a connected undirected graph. Return a deep copy (clone) of the graph. Each node in the graph contains a value (int) and a list (List[Node]) of...
Find Players With Zero or One Losses
Problem Description You are given an integer array matches where matches[i] = [winneri, loseri] indicates that the player winneri defeated player loseri in a match. Return a list answer of size 2...
Redundant Connection
Problem Description In this problem, a tree is an undirected graph that is connected and has no cycles. You are given a graph that started as a tree with n nodes labeled from 1 to n, with one add...