make search return true when mango seller is found (#99)
This commit is contained in:
committed by
Aditya Bhargava
parent
5b675cc2e8
commit
cc845c40f7
@@ -14,6 +14,7 @@ public class BreadthFirstSearch {
|
||||
if (!searched.contains(person)) {
|
||||
if (person_is_seller(person)) {
|
||||
System.out.println(person + " is a mango seller!");
|
||||
return true;
|
||||
} else {
|
||||
searchQueue.addAll(graph.get(person));
|
||||
// Marks this person as searched
|
||||
|
||||
Reference in New Issue
Block a user