## shelley

BAN USER- 0 Answers
**Can someone please explain why the time complexity is written as is in this problem in Cracking the Coding Interview 6th edition?**On page 378, it explains a solution to a system design problem.

- shelley July 11, 2016

It says that the big O analysis of BFS is O(q^k).

Shouldn't it be O(k^q) instead? (Assuming that each person has k nodes and q is the length of the path. We'd have to go through k nodes per level and there are q levels, right?)| Flag | PURGE - 0 Answers
**Can someone please explain why the time complexity is written as is in this problem in Cracking the Coding Interview 6th edition?**On page 378, it explains a solution to a system design problem.

- shelley July 11, 2016

It says that the big O analysis of BFS is O(q^k).

Shouldn't it be O(k^q) instead? (Assuming that each person has k nodes and q is the length of the path. We'd have to go through k nodes per level and there are q levels, right?)| Flag | PURGE - 0 Answers
**Can someone please explain why the time complexity is written as is in this problem in Cracking the Coding Interview 6th edition?**On page 378, it explains a solution to a system design problem.

- shelley July 11, 2016

It says that the big O analysis of BFS is O(q^k).

Shouldn't it be O(k^q) instead? (Assuming that each person has k nodes and q is the length of the path. We'd have to go through k nodes per level and there are q levels, right?)| Flag | PURGE

**CareerCup**is the world's biggest and best source for software engineering interview preparation. See all our resources.