Last active
January 30, 2024 20:34
-
-
Save hedgeye-bnovak/6afb75c0cf55649888f77e269028c19e to your computer and use it in GitHub Desktop.
Nested Hashes - Print Keys
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Given the following hash | |
| h = {a: 1, b1: {b2: {b3: nil}, c2: nil}, c1: {c2: {c3: nil}}} | |
| Write a function that prints out all the keys, in order of their keys (not alphabetical order) | |
| i.e. a, b1, b2, b3, c2, c1, c2, c3 |
hedgeye-bnovak
commented
Feb 17, 2022
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment