Affiliation:
1. New Jersey Institute of Technology, Newark, New Jersey, USA
Abstract
Treaps, blending Binary Search Trees (BST) and Heaps, present a distinctive data structure combining search accuracy with randomized prioritization. This paper explores Treap fundamentals, operations, and implementation details, emphasizing their adeptness in maintaining equilibrium during dynamic operations. The Treap structure, succinctly outlined, features nodes with keys, priorities, and left/right children. Operations like insertion, deletion, and search are demystified, showcasing Treaps' inherent balancing mechanisms. Treap split and join operations, crucial for partitioning and merging based on keys, are explored alongside real-world use cases, underscoring Treaps' versatility. Backed by Java implementation and the TreapAnalyzer class, this research provides concise insights into Treap efficiency. Experimental results, graphically depicted, affirm Treaps' prowess, making them a compelling choice for developers seeking balance and efficiency in computational tasks.