public List<Long> convertToLinkedList(final TreeNode t) {
        // pre-traversal the tree
        if (t == null) {
            return Collections.emptyList();
        }
        final List<Long> list = new LinkedList<Long>();
        traversal(t, list);
        return list;
    }