![]() |
.. (לתיקייה המכילה) | |
Is it possible to define a counter, then change its value and only then assign a parent to it?
| You can assume that the parent (if it exists) is set just after the counter creation. |
Is printSons recursive function?
| No, in printSons you need to print only actual sons of the counter. |
Is 'generation' just a nice name for counter current value?
| No 'generation' is the version of the counter. It should be updated on every counter value update. |
In case counter has no sons what does printSons print?
| Empty string |
What does printSons return?
| No special returned value. So actually self will be returned. |
Should printSons print all the values from the top parent?
|
Yes. The output string for each son has to contain all ancestors. c1 is the father of c2, c2 is the father of c3. c1 = 1, c2 = 2 c3 = 3. for the input: c2 printSons the output will be : 1.2.3 1.2 |
Is the following case possible?
c1, c2, c3 - counters
c2 parent: c1
c2 parent: c3
| You can assume that such situation is impossible. |

