import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; class TreeNode { int value; List children; public TreeNode(int value) { this.value = value; this.children = new ArrayList(); } } public class ListToTreeConverter { public static void main(String[] args) { List flatList = createFlatList(); TreeNode root = convertListToTree(flatList); // 이제 'root'를 사..