Reply to 1207392960368775168
This approach only solves 4 of the 5 examples, so I have to read a little bit on what to do different. My solution is using the shortest path, while keeping track of visited state with the list of collected keys, so fields can be used multiple times if collected keys change.