We use a practical approach based on the Bellman-Ford algorithm [5] to solve the NCD problem with a worst case run-time complexity of O(V E).
our algorithm performs much better than O(V E) on the average because it contains two early termination features.