Amdocs interview question

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