← 返回 bytedance 的题目列表Grid/Graph BFS/DFS: Return Distance and the Farthest (Max) Point
类型:online_judge
Given a point-based structure (likely a grid or a general graph), run a BFS/DFS starting from a given source.
Implement an algorithm that returns:
The distance (the prompt says “return distance”).
The “maximum” point encountered during the search (the prompt says “the largest point”).
Note: The original post does not specify the exact input/output format nor what “maximum” means, so the problem statement is incomplete and needs clarification before it can be turned into an executable coding task.