OA. free
Free
Palo Alto Networks Core Computer Science Core Computer Science Medium

Question 2 By eliminating impossible paths, the best time complexities that can be obtained...

Palo Alto Networks technical mcq question, verified with a worked answer. Free to practise - no sign-up.

By eliminating impossible paths, the best time complexities that can be obtained by general algorithms is

Select any one of the following options

Choose one option.
Show answer & explanation
Answer: A. A) O(V + E)

By eliminating impossible paths (such as in topological DAG shortest paths or pruned branch searches), the optimal lower bound for graph traversal/search is linear in vertices and edges, O(V + E).

Step-by-step Derivation:
Step 1: In graph theory, visiting every reachable state and pruning impossible edges reduces the exploration to optimal linear graph traversal.
Step 2: Visiting each vertex once takes O(V) and exploring each valid edge takes O(E).
Step 3: Hence, the optimal complexity achieved is O(V + E).