Linked List vs Array Performance Explained with My Cats

preview_player
Показать описание
Iterating over linked lists and arrays are both O(n) so the performance is the same, right? No, because caches, watch me EXPLAIN WITH CHOCOLATE YUMMY
Рекомендации по теме
Комментарии
Автор

Fun way to represent things! ...But a little disappointed that performance on iteration was the only thing covered - performance on random access, and on insertion/deletion, are important considerations when choosing a linear container type too!

Anyway, can't complain about representing data as yummy chocolates. Hm, wonder if cats can be trained to be your "system bus", and retrieve the chocolate from system memory for you...🤔

micahcowan