Showing 3 of 38 questions
Given a network of connected nodes with assigned values, find the difference between the highest and lowest possible price sums along valid paths. This challenge tests your ability to efficiently traverse tree or graph structures to calculate cumulative values.
#1. Difference Between Maximum and Minimum Price Sum
Imagine a landscape of varying heights. Calculate how much water can be trapped after it rains, considering the water level can rise from all sides, not just left and right like in the simpler version.
#2. Trapping Rain Water II
You are given an array of numbers. Count how many subsets you can form where each number in the subset is not divisible by any perfect square greater than 1.
#3. Count the Number of Square-Free Subsets
Page 1 of 1 · 38 total