3 ms·
Also not a Java programmer, but my approach would probably involve two classes implementing the nested list interface. One would hold a list, the other an integ
by dllthomas 10y ago
Also not a Java programmer, but my approach would probably involve two classes implementing the nested list interface. One would hold a list, the other an integer (or maybe parameterize over that, depending on the context).
Drawing analogy to lisp, we need to be able to answer "is this a list or an atom?"
Note that the actual structure involved is "really" a rose tree.