All pastes #2132070 Raw Edit

Untitled

public text v1 · immutable
#2132070 ·published 2012-03-25 19:36 UTC
rendered paste body
dohvat = set()
Q = [pocetno]
dohvat.add(pocetno)
while Q:
   x = Q.pop()
   for s in simboli:
      y = delta.get((x,s))
      if y and y not in dohvat:
         dohvat.add(y)
         Q.append(y)
# STARI KOD:
# dohvat = set()
# def rek(st):
#    if st == None: return
#    if st in dohvat: return
#    dohvat.add(st)
#    for s in simboli:
#       rek(delta[(st,s)])
# rek(pocetno)