Can you solve the riddle? My answer is under CW
1) First fill the 5L then pour that into the empty 3L until it is at the rim, now you have 2L of water in the 5L bucket and a full 3L bucket.
2) Pour out the 3 liter bucket leaving you with 2L in the 5L and an empty 5L
3) Pour the 2L from the 5L bucket to the 3L bucket leaving you with an empty 5L bucket and 2L in the 3L bucket
4) Fill the 5L bucket and pour it out into the 3L bucket until it is full. This leaves 4L in the 5L bucket, problem solved.
Can you solve the riddle? My answer is under CW
@freemo @math there’s an algorithm for these, it showed up in a CTF once https://f00l.de/blog/def-con-ctf-2013-diehard/