Topic / 90 questions

Data Structures MCQs

Page 3 of Data Structures multiple-choice questions with answers. Tap an option to check yourself.

Page 3 of 5

Question 42 Data Structures

Why can Dijkstra’s shortest-path algorithm give wrong results on a graph with negative edge weights?

Correct answer C. It finalises a vertex's distance when the vertex is removed from the queue, assuming later paths cannot be shorter

Open question
Advertisement
Question 44 Data Structures

Which description defines a complete binary tree?

Correct answer B. Every level is completely filled except possibly the last, which is filled from left to right

Open question
Advertisement
Advertisement