I'm having trouble trying to figure out a shortest-path algorithm such that given a undirected unweighted graph with an start point a and end point b, every path must contain/run into the vertex v. Is it possible to get it in O(n) if the length is greater than n / 2?
I found this question but it didn't spark anything in my head. It did get me thinking about BFS but how would I know when I went through vertex v?
Can anyone point me into some direction? Thanks!