5/24/2023 0 Comments With index kotlinSo i already did the following: val mutablePersonsAgeChanged = mutablePersons. Val personList = listOf(personA, personB, personC)Īnd now i'm trying to create a new list with the items from mutablePersons modified. This is comparable with searching for an element inside a. We should create indexes to increase performance on our persistence layer. Binary search is one of the most efficient searching algorithms with a time complexity of O(log n. Mostly, it's a copy of selected columns of data from a single table. I did it in the following way: val personA = Person("john", 25) The database index is a data structure that improves the speed of data retrieval operations on a table at the cost of additional writes and storage space. So i created a new List and create a mutableList from it because i want to change their age. I have a data class which is: data class Person (var name : String, var age : Int)Īnd i want to create a List which contains the Person with the multiplied age multiplied per 2, only on even items. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions. I'm playing a little bit with Kotlin and i don't understand this so, maybe someone can explain it to me.
0 Comments
Leave a Reply. |