Lintcode22 Flatten List solution problem solution
[topic description]
Given a list, each element in the list can be a list or integer. Flatten it into a simply list with integers.
Notice:If the element in the given list is a list, it can contain list too.
Given a list, each element in the list is either a list or an integer. Turn it into a simple list that contains only integers.
Note: if the element in a given list is itself a list, it can also contain a list.
[topic link]
Http://www.lintcode.com/en/problem/flatten-list/
[topic Analysis]
Given [1Jing 2, [1JI 2]], return [1BZ 2pm 1P 2].
Given [4, [3, [2, [1], return [4jue 3pm 2pm 1].
Recursive solution and non-recursive solution. It's easy to ask.
[reference answer]
Http://www.jiuzhang.com/solutions/flatten-list/