Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I wonder if I can make an algorithm to check if a given graph G(V,E)$G=(V,E)$ is acyclic or not with the complexity of O(|V|)$O(|V|)$.
I modified the BFS algorithm to do this, but the complexity seems to be O(|V|+|E|)$O(|V|+|E|)$.
I wonder if I can make an algorithm to check if a given graph G(V,E) is acyclic or not with the complexity of O(|V|).
I modified the BFS algorithm to do this, but the complexity seems to be O(|V|+|E|).
I wonder if I can make an algorithm to check if a given graph $G=(V,E)$ is acyclic or not with the complexity of $O(|V|)$.
I modified the BFS algorithm to do this, but the complexity seems to be $O(|V|+|E|)$.
Is that possible to find an algorithm with complexity of O(n) to find an acyclic graph?
I wonder if I can make an algorithm to check if a given graph G(V,E) is acyclic or not with the complexity of O(|V|).
I modified the BFS algorithm to do this, but the complexity seems to be O(|V|+|E|).