Skip to content

Instantly share code, notes, and snippets.

View zdenekmaxa's full-sized avatar

Zdenek Maxa zdenekmaxa

  • Earth
View GitHub Profile
@zdenekmaxa
zdenekmaxa / flatten_list.py
Last active September 25, 2017 15:29
Experienced Backend Engineer at Citrusbyte
""""
Write some code, that will flatten an array of arbitrarily nested arrays of integers into a flat array
of integers. e.g. [[1,2,[3]],4] -> [1,2,3,4].
Your solution should be a link to a gist on gist.github.com with your implementation.
When writing this code, you can use any language you're comfortable with. The code must be well tested
and documented if necessary, and in general please treat the quality of the code as if it was ready to
ship to production.
Try to avoid using language defined methods like Ruby's Array#flatten.