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
Take a nested list and return a single flattened list with all values except nil/null.
3
+
Take a nested array of any depth and return a fully flattened array.
4
4
5
-
The challenge is to write a function that accepts an arbitrarily-deep nested list-like structure and returns a flattened structure without any nil/null values.
5
+
Note that some language tracks may include null-like values in the input array, and the way these values are represented varies by track.
6
+
Such values should be excluded from the flattened array.
6
7
7
-
For example:
8
+
Additionally, the input may be of a different data type and contain different types, depending on the track.
A shipment of emergency supplies has arrived, but there's a problem.
4
+
To protect from damage, the items — flashlights, first-aid kits, blankets — are packed inside boxes, and some of those boxes are nested several layers deep inside other boxes!
5
+
6
+
To be prepared for an emergency, everything must be easily accessible in one box.
7
+
Can you unpack all the supplies and place them into a single box, so they're ready when needed most?
0 commit comments