From anonymous, 1 Year ago, written in Python.
This paste is a reply to Untitled from The Compiler
- view diff
Embed
  1. def iterativeChildren(nodes):
  2.         results = []
  3.         while True:
  4.                 newNodes = []
  5.                 if not nodes:
  6.                         break
  7.                 for node in nodes:
  8.                         results.append(node['id'])
  9.                         newNodes += node['children']
  10.                 nodes = newNodes
  11.         return results

Replies to Re: Untitled rss

Title Name Language When
Re: Re: Untitled anonymous python 1 Year ago.