Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo error in Ruby CS - Recursion #66

Open
ghost opened this issue Mar 1, 2019 · 0 comments
Open

Typo error in Ruby CS - Recursion #66

ghost opened this issue Mar 1, 2019 · 0 comments

Comments

@ghost
Copy link

ghost commented Mar 1, 2019

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 use if element.kind_of?(Array) or if element.kind_of? Array

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants