Depth first search algorithm in spin