Latest 1.0.3
License MIT
Platforms ios 6.0, osx 10.8, requires ARC

Objective-C AVLTree implementation


  MEGATree *tree = [[MEGATree alloc] init];

  //insert key-value pairs - log(n) time
  [tree push:@"someKey" value:someValue];

  //perform lookups - log(n) time
  id value = [tree get:@"someKey"];

  //check for items  - log(n) time
  if([tree contains:@"someKey"]) NSLog(@"FOUND");
  //equivalent check [tree get:@"someKey"] != nil

  //remove items  - log(n) time
  [tree remove:@"someKey"];

  //sort data  - n time
  NSArray *sortedData = [tree orderedArray];

Installation with CocoaPods

CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like MEGATree in your projects. See the "Getting Started" guide for more information.


platform :ios, '7.0'
pod "MEGATree", "~> 1.0"


In computer science, an AVL tree (Georgy Adelson-Velsky and Evgenii Mikhailovich Landis’ tree, named after the inventors) is a self-balancing binary search tree. It was the first such data structure to be invented. Read more on Wikipedia!


The name AVLTree was taken (╯°□°)╯︵ ┻━┻). As AVLTree was, MEGATree is also named after it’s original creators, Mikhailovich Evgenii and Georgy Adelson


MEGATree, AVLTree, Objective-C, Balanced Binary Search Tree, BST

Latest podspec

    "name": "MEGATree",
    "version": "1.0.3",
    "summary": "Objective-C AVLTree implementation",
    "description": "                   Implementation based on MIT's Intro to algorithms lecturen         ",
    "homepage": "",
    "license": "MIT",
    "authors": {
        "Jimmy Bouker": "[email protected]"
    "source": {
        "git": "",
        "tag": "1.0.3"
    "source_files": "MEGATree/*.{h,m}",
    "public_header_files": "MEGATree/*.h",
    "requires_arc": true,
    "platforms": {
        "ios": "6.0",
        "osx": "10.8"

Pin It on Pinterest

Share This