I was looking over some of the general Big-O Algorithm Complexities for different data structures, and wondered what Java's
ArrayList would be considered.
Since I tend to default to an
ArrayList in my Java code when I need a
List (unless I know I need some additional functionality), I was wondering what advantages there would be if I used an implementation (assume well-implemented) of a Red-Black Tree instead.
ArrayList is backed by an
Array, I would assume that it would be considered either an
Array or a
Singly-Linked List according to the linked website. If that is true, it would appear that a Red-Black Tree implementation might a better "default" data structure to use.
What would be the advantages/disadvantages of using a Red-Black Tree instead of the ArrayList? (and minor accompanying question, what would
ArrayList be considered in the Algorithm Complexities website?)