Problem Statement: You are given n balloons, indexed from 0 to n – 1. Each balloon is painted with a

Continue reading# Category: Data Structure

## Evaluate Boolean Expression to True | Partition DP: DP 52

Problem Statement: Given an expression, A, with operands and operators (OR, AND, XOR), in how many ways can you evaluate

Continue reading## Palindrome Partitioning – II | Front Partition : DP 53

Problem Statement: Given a string s, partition s such that every substring of the partition is a palindrome. Return the

Continue reading## Partition Array for Maximum Sum | Front Partition : DP 54

Problem Statement: Given an integer array arr, partition the array into (contiguous) subarrays of length at most k. After partitioning,

Continue reading## Maximum Rectangle Area with all 1’s | DP on Rectangles: DP 55

Problem Statement: Given a row X cols binary matrix filled with 0’s and 1’s, find the largest rectangle containing only

Continue reading## Count Square Submatrices with All 1s | DP on Rectangles : DP 56

Problem Statement: Given an n * m matrix of ones and zeros, return how many square submatrices have all ones.

Continue reading## G-40: Number of Ways to Arrive at Destination

You are in a city that consists of n intersections numbered from 0 to n – 1 with bi-directional roads

Continue reading## G-38: Cheapest Flights Within K Stops

There are n cities and m edges connected by some number of flights. You are given an array of flights

Continue reading## G-37: Path With Minimum Effort

You are a hiker preparing for an upcoming hike. You are given heights, a 2D array of size rows x

Continue reading## G-36: Shortest Distance in a Binary Maze

Problem Statement: Given an n * m matrix grid where each element can either be 0 or 1. You need

Continue reading