A tango tree is a type of binary search tree proposed by Erik D. Demaine, Dion Harmon, John Iacono, and Mihai Pătrașcu in 2004. It is named after Buenos Aires, of which the tango is emblematic.
It is an online binary search tree that achieves an O ( log log n ) {\displaystyle O(\log \log n)} competitive ratio relative to the offline optimal binary search tree, while only using O ( log log n ) {\displaystyle O(\log \log n)} additional bits of memory per node. This improved upon the previous best known competitive ratio, which was O ( log n ) {\displaystyle O(\log n)} .