7 kyu
Find the max depth in an array
Description:
Write a method that finds the max depth in the array.
i.e.
[] should return 1
[1] should return 1
[1, 2] should return 1
[1, [2]] should return 2
[1, [2, 2]] should return 2
[1, [2, [3]]] should return 3
[1, [2, [3, [4], 3]]] should return 4
[1, [[], [3, [], 3]]] should return 4
[1, [[], [3, [[]], 3]]] should return 5
Arrays
Similar Kata:
Stats:
Created | Sep 9, 2014 |
Published | Sep 9, 2014 |
Warriors Trained | 435 |
Total Skips | 24 |
Total Code Submissions | 548 |
Total Times Completed | 149 |
Ruby Completions | 149 |
Total Stars | 17 |
% of votes with a positive feedback rating | 94% of 64 |
Total "Very Satisfied" Votes | 58 |
Total "Somewhat Satisfied" Votes | 4 |
Total "Not Satisfied" Votes | 2 |