אלגוריתם חיפוש לרוחב – הבדלי גרסאות

תוכן שנמחק תוכן שנוסף
מ ביטול גרסה 7926070 של רוזבאד (שיחה)
מ ←‏תיאור פורמלי: push וpop זה במחסנית
שורה 17:
 
'''function''' breadthFirstSearch (Start, Goal) {
pushenqueue(Queue,Start)
'''while''' notEmpty(Queue)) {
Node := popdequeue(Queue)
'''if''' Node = Goal {
return Node
שורה 26:
'''if''' notVisited(Child) {
setVisited(Child)
pushenqueue(Queue, Child)
}
}