public TreeNode deserialize(String data){
  Deque<String> nodes=new LinkedList<>();
  nodes.addAll(Arrays.asList(data.split(SPLITER)));
  return buildTree(nodes);
}

public TreeNode deserialize ( String data ) { Deque < String > nodes = new LinkedList < > ( ) ; nodes . addAll ( Arrays . asList ( data . split ( SPLITER ) ) ) ; return buildTree ( nodes ) ; }
recursive . same as pre - order traversal . split data and create a queue of string values first . each time , poll a node from the queue , create the current root . then build left and right subtree recursively .
