You have the best explanations on KZbin that I have seen! What is your background? Are you a Senior Software Engineer?
@coolvjh3 жыл бұрын
Very well explained. Thank you 😀
@Paunitza3 жыл бұрын
Great explanation! Thank you!
@aunnfriends4 жыл бұрын
Here is a bit of feedback. Please zoom in the screen on the code when you are coding, otherwise it is hard to see for some other people. My eyesight is not that bad but I still need to make an effort to see the code. Keep up the good work!
@happycoding10934 жыл бұрын
Thanks for the feedback, I zoom to 150% in my latest video, it should be big enough.
@mickys49993 жыл бұрын
why do we need the below code next_d = (d + i)%4 if i use the below code like normal DFS, then why it throws recursion depth exceeded for dir in directions: new_x = x+ dir[0] next_y = y + dir[1] why robot.move() doesnt return False
@happycoding10933 жыл бұрын
next_d = (d + i)%4 to make sure next_d is in the range of [0,3]
@happycoding10933 жыл бұрын
my guess is that your robot stuck in an infinite loop, and that's why robot.move does not return False
@nene72922 жыл бұрын
For direction, why is up: (-1, 0) and not (0, -1)? Since the coordinate is of format (x, y), I would think the y would be -1 for up...
@muhammadrehanalikhan14532 жыл бұрын
its actually not (x,y) coordinate. Its rows and cols. By convention, the top left corner of 2D grid is considered (row =0, col = 0). So: incrementing row == going down & incrementing col == going right
@yang58433 жыл бұрын
Thank you!
@anilkatakam27383 жыл бұрын
Helpful. thank you.
@vishalmishra95493 жыл бұрын
thanks :)
@rasi9441 Жыл бұрын
isnt it the time complexity O(N), where N is the number of cells? because each cell is visited once. I think 4^N should have been the case if we was doing repetitive work, but since we are tracking with visited, we should be okay.