[Solved] Chasing game in C [closed]

It is an interesting problem. Let’s go over the rules again. Players Chicken: takes shortest path to field (there could be multiple shortest paths) and away from eagle (maximise the distance between itself and eagle among shortest paths). Eagle: takes shortest path to chicken To solve the problem we have to assume it is played … Read more

[Solved] Letter combinations of a phone number

The problem is that you’re both looping and recursing. print(“22”, “”, 0); will recurse into print(“22”, “a”, 1); print(“22”, “b”, 1); print(“22”, “c”, 1); print(“22”, “a”, 2); print(“22”, “b”, 2); print(“22”, “c”, 2); and your extra bits are the last three calls. Get rid of the loop over the input digits (you’re already doing that … Read more