Tell me how you solved a coding assessment that included a water jug puzzle and a system design problem, and then how you handled SQL query questions and ORM alternatives.
For the coding portion, implement the water-jug algorithm. Given two jug capacities and a target volume, return the shortest sequence of jug states that reaches the target, or an empty list if it is impossible.
The function returns states as (amount_in_first_jug, amount_in_second_jug), beginning with (0, 0). A valid move fills, empties, or pours between jugs.
def solve_water_jug(capacity_a, capacity_b, target):