Skip to content

Instantly share code, notes, and snippets.

View isnikulin's full-sized avatar
🦍

Ivan Nikulin isnikulin

🦍
View GitHub Profile
@isnikulin
isnikulin / java-collections-complexity.md
Created October 19, 2021 13:46 — forked from cedricvidal/java-collections-complexity.md
Runtime Complexity of Java Collections

Below are the Big O performance of common functions of different Java Collections.

List Add Remove Get Contains Next Data Structure
ArrayList O(1) O(n) O(1) O(n) O(1) Array
LinkedList O(1) O(1) O(n) O(n) O(1) Linked List
CopyOnWriteArrayList O(n) O(n) O(1) O(n) O(1) Array