Amdocs Interview Question

The 3 & 5 liter water problem. Data structures, SQL queries.