Why kotlin does not provide LinkedList implementation?

@sandeep549 I cannot agree with you. All deques (incl. queues and stack) are much faster when they are based on arrays. You should never use linked lists for that purpose, especially if you do competitive programming where performance is important.

You only need linked lists when you need to insert into the middle in O(1). This almost never happens in practice and extremely rarely needed in competitive programming. When it does happen you usually need an “intrusive list” which Java’s LinkedList does not provide anyway.

3 Likes