What is the best way of implementing an ArrayList that can store any level of ArrayLists within Arraylists and Integers.
List<List<Integer>> list = ArrayList<List>();
only allows up to 2 levels of lists within lists and doesn't allow for a mix of Intergers and ArrayLists.
This is some easy easy stuff in Python. And its a dumb data structure but unfortunately coding tests call for these sort of things.
> list (or something similar? an Integer is an Object, so is an ArrayList
– Stultuske Mar 20 '19 at 06:53