Skip to content

Data structures

By now your name and particulars have been fed into every laptop, desktop, mainframe and supermarket scanner that collectively make up the global information conspiracy, otherwise known as "The Beast."

Performance overview

Data structure Access Search Insert Delete
Lists \(\color{white} \fcolorbox{limegreen}{forestgreen} {Θ(1)}\)\(\color{white} \fcolorbox{limegreen}{forestgreen} {O(1)}\) \(\color{black} \fcolorbox{gold}{yellow} {Θ(n)}\)\(\color{black} \fcolorbox{gold}{yellow} {O(n)}\) \(\color{black} \fcolorbox{gold}{yellow} {Θ(n)}\)\(\color{black} \fcolorbox{gold}{yellow} {O(n)}\) \(\color{black} \fcolorbox{gold}{yellow} {Θ(n)}\)\(\color{black} \fcolorbox{gold}{yellow} {O(n)}\)
Queues \(\color{black} \fcolorbox{gold}{yellow} {Θ(n)}\)\(\color{black} \fcolorbox{gold}{yellow} {O(n)}\) \(\color{black} \fcolorbox{gold}{yellow} {Θ(n)}\)\(\color{black} \fcolorbox{gold}{yellow} {O(n)}\) \(\color{white} \fcolorbox{limegreen}{forestgreen} {Θ(1)}\)\(\color{white} \fcolorbox{limegreen}{forestgreen} {O(1)}\) \(\color{white} \fcolorbox{limegreen}{forestgreen} {Θ(1)}\)\(\color{white} \fcolorbox{limegreen}{forestgreen} {O(1)}\)
Sets \(\color{black} \fcolorbox{gold}{yellow} {Θ(n)}\)\(\color{black} \fcolorbox{gold}{yellow} {O(n)}\) \(\color{black} \fcolorbox{gold}{yellow} {Θ(n)}\)\(\color{black} \fcolorbox{gold}{yellow} {O(n)}\) \(\color{white} \fcolorbox{limegreen}{forestgreen} {Θ(1)}\)\(\color{white} \fcolorbox{limegreen}{forestgreen} {O(1)}\) \(\color{white} \fcolorbox{limegreen}{forestgreen} {Θ(1)}\)\(\color{white} \fcolorbox{limegreen}{forestgreen} {O(1)}\)
Maps \(\color{white} \fcolorbox{limegreen}{forestgreen} {Θ(1)}\)\(\color{white} \fcolorbox{limegreen}{forestgreen} {O(1)}\) \(\color{white} \fcolorbox{limegreen}{forestgreen} {Θ(1)}\)\(\color{black} \fcolorbox{gold}{yellow} {O(n)}\) \(\color{white} \fcolorbox{limegreen}{forestgreen} {Θ(1)}\)\(\color{black} \fcolorbox{gold}{yellow} {O(n)}\) \(\color{white} \fcolorbox{limegreen}{forestgreen} {Θ(1)}\)\(\color{black} \fcolorbox{gold}{yellow} {O(n)}\)