Examveda

Given below is the pseudocode of the flooding algorithm. Node and message are denoted by n and m respectively. Which of the following best suits the blank?
if m.id was seen before, discard
else, add m.id to list of seen messages and ______

A. discard the message

B. forward the message in the direction from where it came.

C. forward the message to all neighbors of n

D. forward the message to the left neighbor of n

Answer: Option C


This Question Belongs to Data Structure >> Miscellaneous On Data Structures

Join The Discussion

Related Questions on Miscellaneous on Data Structures