Language of all graphs that have diameter larger than $\frac{n}{2}$

26 Views Asked by At

Let $$A=\{\langle G\rangle \mid G=(V,E) \text{ is an undirected graph, } |V|=n \text{ and } \text{diam}(G)\geq n/2\}$$
Show that $A\in NL$ by showing a log space decider.

I've tried to create a decider that goes over all vertices and tries to non deterministically choose a path, but I figured nothing promises me that the path will be the shortest one.
I've also read online about versions of BFS that take log-space time, but I wasn't able to fit it to this problem

Am I missing something substantial and there's a simpler way?