Q. What is the time complexity for finding a Hamiltonian path for a graph having N vertices (using permutation)?

  • (A) o(n!)
  • (B) o(n! * n)
  • (C) o(log n)
  • (D) o(n)
πŸ’¬ Discuss
βœ… Correct Answer: (B) o(n! * n)
Explanation: for a graph having n vertices traverse the permutations in n! iterations and it traverses the permutations to see if adjacent vertices are connected or not takes n iterations (i.e.) o(n! * n).

Explanation by: Mr. Dubey
for a graph having n vertices traverse the permutations in n! iterations and it traverses the permutations to see if adjacent vertices are connected or not takes n iterations (i.e.) o(n! * n).

πŸ’¬ Discussion

πŸ“Š Question Analytics

πŸ‘οΈ
797
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
90%
Success Rate