If it is found, it must be returned so that the solution path can be constructed.
If the final state is not found following an exhaustive search, null must be returned:
Search(s,adder)
d[s] = 0
pred[s] = null
DEQ = {s}
while DEQ ≠ {} do
u = Remove[DEQ]
if success
then return u
else
for each v ∈ Expand(u) do
Add(DEQ,v,adder)
return null