NeetCode #141LC-799MediumArrays & Hashing
← Back to All Problems#141 · #799 · Champagne Tower(香槟塔)
📌 Problem Statement & Constraints
Champagne is poured into the top glass of a tower. Each glass holds exactly 1 unit; excess spills equally into the two glasses below it. Given
poured, query_row and query_glass, return how full the queried glass is (capped at 1). Constraints: 0 <= poured <= 10^9, 0 <= query_glass <= query_row <= 99.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!