<commit_before>//
//  binary_tree.h
//  CTestArena
//
//  Created by <NAME> on 10/5/13.
//  Copyright (c) 2013 Monkey Bits. All rights reserved.
//

#ifndef CTestArena_binary_tree_h
#define CTestArena_binary_tree_h

/* Binary tree type. */
typedef struct bt_node *binary_tree;

/* Create an empty binary tree. */
binary_tree bt_create(void);

/* Free a binary tree. */
void bt_free(binary_tree);

/* Is the binary tree empty? */
_Bool bt_is_empty(binary_tree);

/* Insert value into binary tree.
 * Returns the new node inserted into the tree.
 */
binary_tree bt_insert(binary_tree, int);

/* Remove value from binary tree.
 * Returns the tree node that replaced the element just removed.
 */
binary_tree bt_remove(binary_tree, int);

/* Does tree contain value? */
_Bool bt_contains(binary_tree, int);

/* Convert the existing tree into a balanced tree (what happens to original tree?) */
binary_tree bt_rebalance(binary_tree);

/* The number of elements contained in the binary tree. */
int bt_size(binary_tree);

/* The maximum depth of the binary tree. */
int bt_depth(binary_tree);

#endif<commit_msg>add bt initializer list function<commit_after>//
//  binary_tree.h
//  CTestArena
//
//  Created by <NAME> on 10/5/13.
//  Copyright (c) 2013 Monkey Bits. All rights reserved.
//

#ifndef CTestArena_binary_tree_h
#define CTestArena_binary_tree_h

/* Binary tree type. */
typedef struct bt_node *binary_tree;

/* Create an empty binary tree. */
binary_tree bt_create(void);

/* Create a binary tree with the given elements. */
binary_tree bt_create_withvalues(int count, ...);

/* Free a binary tree. */
void bt_free(binary_tree);

/* Is the binary tree empty? */
_Bool bt_is_empty(binary_tree);

/* Insert value into binary tree.
 * Returns the new node inserted into the tree.
 */
binary_tree bt_insert(binary_tree, int);

/* Remove value from binary tree.
 * Returns the tree node that replaced the element just removed.
 * If the node removed was a leaf node then the return value will be the empty binary tree.
 */
binary_tree bt_remove(binary_tree, int);

/* Does tree contain value? */
_Bool bt_contains(binary_tree, int);

/* Convert the existing tree into a balanced tree (what happens to original tree?) */
binary_tree bt_rebalance(binary_tree);

/* The number of elements contained in the binary tree. */
int bt_size(binary_tree);

/* The maximum depth of the binary tree. */
int bt_depth(binary_tree);

#endif
{'fraction_non_alphanumeric': 0.10305028854080792, 'fraction_numerical': 0.00741962077493817, 'mean_word_length': 3.9835728952772076, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '121994', 'n_tokens_mistral': 768, 'n_tokens_neox': 747, 'n_words': 280}