Design a Nested TODO List that supports hierarchical tasks. Each task has an id, title, completed flag, and a list of children subtasks. Implement a TodoList class with the following API:
TodoList() initializes an empty system.
addTask(title) -> int adds a root-level task and returns its globally unique id.
addSubtask(parentId, title) -> int adds a subtask under the given parent task; returns the new task id or -1 if parentId does not exist.
complete(taskId) marks the task and every subtask in its subtree as completed; does nothing if taskId is invalid.
getTasks() -> List[str] returns a pre-order traversal of all tasks formatted as " " * depth + "[x] " + title if completed, else "[ ] " + title.
Use a flat hash map tasks: id -> Task for O(1) lookups and maintain a separate roots list (or compute roots by tracking parentId == None).