Programming in Kotlin - Part 35: Which Collection To | Ray Wenderlich

Find out which collection you should use in a given situation.

This is a companion discussion topic for the original entry at

Searching by key in Maps is O(N) in the picture shown in video, but it schould be O(1) ?

Hmm, it looks like you are correct. Not sure how I got that wrong. Did some more research and for the most part it looks like it will be O(1) for HashMaps. A lot depends on the size of the collection and how good the hashcode function is.

Agreed with ingobergen. The discrepancy is between the slide and your explanation. This is only a minor point though. Overall an excellent course on kotlin so far.

@choywk Really glad you like it! Cheers! :]