<commit_before>#!/usr/bin/env python
# coding=utf-8

class Node:
    """Binary Search Tree Node class

    >>> btree = BinaryTree(12)
    >>> for i in [5, 18, 2, 9, 15, 19, 13, 17]:
    ...     btree.insert(i)
    >>> btree.root.print_in_order()
    2
    5
    9
    12
    13
    15
    17
    18
    19
    >>> [node.payload for node in btree.root.in_order_walk()]
    [2, 5, 9, 12, 13, 15, 17, 18, 19]
    >>> btree.search(5)
    5
    >>> btree.search(99)
    """

    def __init__(self, payload, left=None, right=None, parent=None):
        self.payload = payload<commit_msg>added big-O comment to binary_tree<commit_after>#!/usr/bin/env python
# coding=utf-8

#           Average     Worst
# Space     O(n)        O(n)
# Search    O(log n)    O(n)
# Insert    O(log n)    O(n)
# Delete    O(log n)    O(n)

class Node:
    """Binary Search Tree Node class

    >>> btree = BinaryTree(12)
    >>> for i in [5, 18, 2, 9, 15, 19, 13, 17]:
    ...     btree.insert(i)
    >>> btree.root.print_in_order()
    2
    5
    9
    12
    13
    15
    17
    18
    19
    >>> [node.payload for node in btree.root.in_order_walk()]
    [2, 5, 9, 12, 13, 15, 17, 18, 19]
    >>> btree.search(5)
    5
    >>> btree.search(99)
    """

    def __init__(self, payload, left=None, right=None, parent=None):
        self.payload = payload
{'fraction_non_alphanumeric': 0.15789473684210525, 'fraction_numerical': 0.07518796992481203, 'mean_word_length': 2.025, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 39, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3895588', 'n_tokens_mistral': 586, 'n_tokens_neox': 512, 'n_words': 138}