B-Tree with Splay Optimization

Features

  • โœ“ Configurable N-way branching (min degree โ‰ฅ 2)
  • โœ“ Splay-like node promotion for hot data
  • โœ“ Thread-safe operations with mutexes
  • โœ“ Real-time async operations with callbacks
  • โœ“ Interactive macOS GUI visualization
make && ./BTreeVisualizer

Complexity

  • Search: O(log n)
  • Insert: O(log n)
  • Delete: O(log n)
  • Space: O(n)
View Proofs

Dynamic N-Way Splay Tree

Rsync Optimized

  • โœ“ Dynamic N-way branching (2 to N, adaptive)
  • โœ“ Full splay operations (Zig, Zag, Zig-Zig, etc.)
  • โœ“ Rolling checksums (Adler-32 variant)
  • โœ“ Block metadata and matching
  • โœ“ Real-time visualization with access counts
make splay && ./NSplayTreeVisualizer

Complexity

  • Search: O(log n) amortized
  • Insert: O(log n) amortized
  • Delete: O(log n) amortized
  • Space: O(n)
View Proofs

Circular Buffer Splay Tree

Features

  • โœ“ Fixed-size circular buffer for memory efficiency
  • โœ“ Self-adjusting splay tree operations
  • โœ“ Multiple sorting modes (lexicographic, numeric, semantic)
  • โœ“ Ascending and descending sort support
  • โœ“ LRU eviction policy when buffer is full
  • โœ“ Thread-safe operations with mutex locks
#include "CircularBufferSplayTree.h"

Complexity

  • Search: O(log n) amortized
  • Insert: O(log n) amortized
  • Delete: O(log n) amortized
  • Sort: O(n) or O(nยทk) for variable keys
  • Space: O(bufferSize)
View Proofs

Sorting Modes

๐Ÿ“ Lexicographic

String-based alphabetical comparison for text data

๐Ÿ”ข Numeric

Standard numeric comparison for integer/float keys

๐Ÿง  Semantic

Custom comparison function for domain-specific ordering

Interactive Visualizations

Nodes: 0
Height: 0
Operations: 0

Complexity Analysis

Operation B-Tree N-Way Splay Tree Circular Buffer Splay Space
Search O(log n) O(log n) amortized O(log n) amortized O(n)
Insert O(log n) O(log n) amortized O(log n) amortized
Delete O(log n) O(log n) amortized O(log n) amortized
Sort (Asc/Desc) O(n) O(n) O(n) or O(nยทk)
Sort Modes - - Lex/Num/Sem

About

This project implements high-performance tree data structures with multithreaded operations and real-time GUI visualization for macOS.

Copyright (C) 2025, Shyamal Suhana Chandra. All rights reserved.

Technology Stack

C++ Objective-C TypeScript JavaScript Canvas API Jekyll GitHub Pages