Ad
  • Custom User Avatar

    Also, of course, your specifications for how the decorations should be added is pretty much non-existent.

  • Custom User Avatar

    Your random tests are testing user function against itself.

  • Custom User Avatar

    Initial code is wrong (has wrong number of arguments).

  • Custom User Avatar

    But by doing so, you can complete it just by copying the result, as you did in your solution?

  • Custom User Avatar

    It does have random tests, I don't get, why they don't work, though?

    Will, try to make a better explanation tomorrow.

  • Custom User Avatar

    Needs random test cases

  • Custom User Avatar

    Thanks for the explanation! Really helped me understand the concept :D

    PS. It might be worth noting, that the sum should be replaced by the sum of the sum's two digits, every time it exceeds 10.

  • Custom User Avatar

    You're right, the 2nd argument is the number of o's, this have been clarified now.

    • Because it creates the illusion that the decorations are going around the tree.
    • Nothing, just let it be.
    • It'd look like the decorations is going around the tree.
    • They're supposed to be there, and they're there, at least for me?

    Thank you for the feedback!

  • Default User Avatar

    Some questions:

    In decoratedTree(7, 2) I suppose 2d argument is for number of o-decoration per "row" (It would be better to tell it explicitely).

    • Then why Is there only one o in 4th row of your tree ? :
          @      
          ~      
         ~oo     
        ~~~~o    <-- there !
    
    • What are we supposed to do if this 2d argument is greater than row width (like in 2d row for example) ?
          @      
          ~      <-- no deco ?
    
    • Where are we supposed to put decorations ?
       oo~~~~~    <-- on the left ?
      ~~~oo~~~~   <-- ... the middle ?
     ~~~~~~oo~~~
    ~~~~~~~~~oo~~ <-- ... the right ?
    

    It seems there're spaces on the right too except the last one . . .

          # <-- here !
    
    • Is it an issue or expected behaviour ?