# Functions and Fractals - Recursive Trees

# Functions and Fractals - Recursive Trees

darshan_butiya + 0 comments which scala collection you used to solve this problem?

paolo_veronelli + 1 comment it should be stated which column is the first '1' being into, because middle is between 50 and 51 counting from one

[DELETED] + 0 comments [deleted]

Benjamin_A_Luna + 0 comments I really enjoyed solving this problem, also it was hard. But I don't know if I did it in the right way, because it took me 25 lines of code in

**F#**.

penkovsky + 0 comments The idea may be summarized by this function:

y :: Int -> String -> [String] y n branches = replicate n branches ++ take n (iterate grow $ divide branches)

Where divide creates twice more 1's than in the branches string.

b_maslakov + 0 comments Managed to solve it in 24 lines of scala code without variables. Never been so proud of myself.

Mitro + 0 comments The checker doesn't seem to enforce the "no val" rule in Scala

Shepi + 1 comment It would be nice if the constraints indicate whether n can be 0 or not. I'll assume 1 <= n <= 5.

[DELETED] Asked to answer + 0 comments [deleted]

dhirajhimani + 0 comments Finally did a solution in scala Took some time but it was good to learn

No more comments

Sort 8 Discussions, By:

Please Login in order to post a comment