Skip to content

Instantly share code, notes, and snippets.

Omkar Lokhande lokhandeomkar

View GitHub Profile
View gist:f779b622514a1113cc901b680329570f
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
You can’t perform that action at this time.