Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // AVL tree.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы.
- //
- #include <iostream>
- #include <stdio.h>
- #include <stdlib.h>
- #include <stdbool.h>
- using namespace std;
- struct Node
- {
- int key;
- int value;
- Node* left;
- Node* right;
- int height;
- };
- struct Node* newNode(int key, int value)
- {
- struct Node* node = (struct Node*)malloc(sizeof(struct Node));
- node->key = key;
- node->value = value;
- node->left = NULL;
- node->right = NULL;
- node->height = 1;
- return node;
- }
- void insert(struct Node* root, int key, int value)
- {
- }
- void find(struct Node* root, int key)
- {
- }
- void pop(struct Node* root, int key)
- {
- }
- int main()
- {
- int n;
- cin >> n;
- for (int i = 0; i < n; i++)
- {
- char operation;
- cin >> operation;
- if (operation == 'F')
- {
- return 0;
- }
- int key;
- cin >> key;
- if (operation == 'D')
- {
- delete()
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement