You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's a typo error in the answer for:
Question: Define a recursive function that flattens an array. The method should convert [[1, 2], [3, 4]] to [1, 2, 3, 4] and [[1, [8, 9]], [3, 4]] to [1, 8, 9, 3, 4].
Answer: Line 3 is if element.kind_of?(Array, it is missing closing bracket. Either use if element.kind_of?(Array) or if element.kind_of? Array
The text was updated successfully, but these errors were encountered:
Link: https://www.codequizzes.com/computer-science/beginner/recursion
There's a typo error in the answer for:
Question:
Define a recursive function that flattens an array. The method should convert [[1, 2], [3, 4]] to [1, 2, 3, 4] and [[1, [8, 9]], [3, 4]] to [1, 8, 9, 3, 4].
Answer: Line 3 is
if element.kind_of?(Array
, it is missing closing bracket. Either useif element.kind_of?(Array)
orif element.kind_of? Array
The text was updated successfully, but these errors were encountered: