IXL Learning interview question

Sort a nasted list in efficient way