def dft (self, array): Stack = Stack () visited = set () stack.append (self), a len (stos)> 0 i podczas gdy len (odwiedzony)> = 0: current = Stack.pop () tablica. append (bieżący) wizyta.

def dft(self, array):
    stack = Stack()
    visited = set()
    stack.append(self)
    while len(stack) > 0 and while len(visited) >= 0:
        current = stack.pop()
        array.append(current)
        visited.add(current)
    return array
Handsome Hummingbird