CHEF AND FRIENDSHIP
CodeChefOpen on judge ↗
CHEF AND FRIENDSHIP Given a matrix (GRID) of size NxM , where N is the number of rows and M is the number of columns. The matrix has 0 and 1 as its cells . 0 represents a barrier and chef cannot pass through a barrier. Our chef is stuck at a position in grid with co-ordinates (i,j) and wants to reach his friend , the co-ordinate (a,b) where his friend is waiting for him. Chef can either move l
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start