Talk:Tree from nesting levels: Difference between revisions

mNo edit summary
Line 96:
 
: Sorry, but what's wrong with a tree with multiple nodes at level 1? I mean, even a binary tree has got 2''!'' [oh, one node, two children.. hmm]<br>
:: Not quite sure what ''wrong'' means to you exactly here. Siblings inescapably have a parent :-) [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 17:32, 7 February 2021 (UTC)
: What is the purpose or benefit of littering up the nested structures (a better name?) with all those None?<br>
:: That's just a representation of the implicit structure. Each of these examples implies the existence of one or more parent nodes which have no explicit (integer) node value.
::* Two or more level 1 siblings implicitly share a level 0 parent:
::* Where we are given a 1 and a 3 but no 2, the 3 inescapably has a level 2 parent which '''(a)''' lacks the integer 2 as a node value and '''(b)''' is a child of a level 1 node. [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 17:32, 7 February 2021 (UTC)
: What about programming languages where not everything ''has'' to be a tuple (whatever ''that'' its)?<br>
:: No problem at all :-) (Paddy3118 will explain to you what a tuple is). [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 17:32, 7 February 2021 (UTC)
: It seems to me you're trying to forcefully impose functional programming rules or something onto this task. --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 17:24, 4 February 2021 (UTC)
:: Does it ? Just exploring what the input notation really represents.
:: That's necessary, because the output shown is rejected as inconsistent by compilers of strictly-typed languages, so we need something else in those cases, and that means we need to know what we are really representing. [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 17:32, 7 February 2021 (UTC)
 
::Aye, <strike>"You have no control of level 0, and integer zero being the unnumbered root level"</strike>. (For an alternate view, that now I've wrote it, I don't like). The task description is enough to write examples, for I think. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 18:23, 4 February 2021 (UTC)
9,655

edits