3963. Create Grid With Exactly One Path
LeetCodeOpen on judge ↗
You are given two integers m and n, representing the number of rows and columns of a grid. Construct any m x n grid consisting only of the characters '.' and '#', where: - '.' represents a free cell. - '#' represents an obstacle cell. A valid path is a sequence of free cells that: - Starts at the top-left cell (0, 0). - Ends at the bottom-right cell (m - 1, n - 1). - Moves only: - Right, f
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