#Difficulty
1 messages · Page 1 of 1 (latest)
say on god
wait im a lil stupid how did u go about battleship question
same here
i tried dfs but didnt get sum test cases
but idk i havent done a lotta graph problems so
You don’t need graphs
O
HUGE W
still prolly won’t get an int but we ball
made a dict with number of cells each ship occuppied. Iterated over shots and handled each case they had in question
You don’t even need a dict if you do it in place
I mean it was j one loop so O(N) anyways
oh ok i see