Problem Statement: You are given n balloons, indexed from 0 to n – 1. Each balloon is painted with a
Continue readingCategory: 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 readingPalindrome 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 readingPartition 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 readingMaximum 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 readingCount 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 readingG-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 readingG-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 readingG-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 readingG-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