• למודעות דרושים בתחום Algorithms לחצו כאן.
בנושא: Algorithms
0 תגובות
0 תגובות
השאלה:
ממש בפסאודו קוד חיפוש לרוחב BFS
התשובה:
דוגמאת קוד מצורפת:
unmark all vertices
choose some starting vertex x
mark x
list L = x
tree T = x
while L nonempty
choose some vertex v from front of list
visit v
for each unmarked neighbor w
mark w
add it to end of list
add edge vw to T
דוגמאת קוד מצורפת:
unmark all vertices
choose some starting vertex x
mark x
list L = x
tree T = x
while L nonempty
choose some vertex v from front of list
visit v
for each unmarked neighbor w
mark w
add it to end of list
add edge vw to T
לשאלה זו אין כרגע תגובות.
| תגובה לשאלה מספר : 746 בנושא : Algorithms |
![]() |
||||
| שם מלא : | כתובת אימייל : | ||||
| תוכן תגובה : | |||||
הוסף תגובה
שלח תגובה



