Kotlin: Merge Multiple Lists then ordering Interleaved merge list
问题 I have class CatalogProduct(id: String, name: String) to declare a product I have two list below: val newestCatalogProductList = mutableListOf<CatalogProduct>() newestCatalogProductList.add(CatalogProduct("A1", "Apple")) newestCatalogProductList.add(CatalogProduct("A2", "Banana")) newestCatalogProductList.add(CatalogProduct("A3", "Orange")) newestCatalogProductList.add(CatalogProduct("A4", "Pineapple")) val popularCatalogProductList = mutableListOf<CatalogProduct>() popularCatalogProductList