Longest Path
CodeChefOpen on judge ↗
Problem Statement Given a 2D grid of integers, find the length of the longest path, starting at 0, of consecutive integers. Movement is permitted in all directions (horizontally, vertically, or diagonally). Input First line of input contains T, the number of test cases. Each test case will start with a line containing two integers R & C, the number of rows and columns in the grid respectiv
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