Expogo Google Codejam - help needed coding advice

I tried round 1B yesterday of codejam. I invested fully 2 hours in this First question ( Expogo). And Can’t able to comeup with optimal solution for test Case3. First thing comes in my mind of BFS and thats it. Currently, I am 3star at codechef. At Leetcode, solved about 72 medium with total 89 questions.
My question is Am I wasting my time coding cause it looks no matter how much I practice, I always fails. If I can’t solve this simple logical question (Expogo) why should I go for learning graphs, trees. Does this happened with you too. What can I do to improve it, cause it seems like in time constraint environment I always fails.

1 Like

Anybody can have an off day man, it’s perfectly normal. Practicing can not reduce your skill, it’ll only improve it. Just keep your morale high and practice as much as you can.