Q: How can I find this data? Hello suppose class lists are maintained in 3 different data structures. A linked list contains the numbers of students who took Statistics, Computer Networks in a B+ tree, and Differential Equations in an AVL tree. In each lesson, the numbers, names and surnames of the students are kept. In the B+ tree, the indexing is done according to the student surnames, and in the AVL tree, the indexing is done according to the student number.
a) Write the pseudo code of the function you wrote? Use the basic linked list, B+ tree, and AVL tree operations when writing the rough code of the function.
b) Calculate the execution time and time complexity of the function you wrote. Show the calculation steps?
(Note1: Students are not ordered in any way in the linked list.)
(Note2: At the end of the function you wrote, the class lists will not change. That is, the students in the data structures will remain the same.)
class Program
    {
        static void Main(string[] args)
        {
            AVL tree = new AVL();
            
            tree.Add("ba");
            tree.Add("ab");
           
            
            tree.DisplayTree();
            tree.DisplayTree();
        }
    }
    class AVL
    {
        class Node
        {
            public int data;
            public string LastName;
            public string FirstName;
            public Node left;
            public Node right;
            public Node(int data)
            {
                this.data = data;
            }

            public Node(string LastName)
            {
                this.LastName = LastName;
            }

            /*public Node(string FirstName)
            {
                this.FirstName = Firstname;
            }*/
        }
        Node root;
        public AVL()
        {
        }
        public void Add(int data)
        {
            Node newItem = new Node(data);
            if (root == null)
            {
                root = newItem;
            }
            else
            {
                root = RecursiveInsert(root, newItem);
            }
        }

        public void Add(string data)
        {
            Node newItem = new Node(data);
            if (root == null)
            {
                root = newItem;
            }
            else
            {
                root = RecursiveInsert(root, newItem);
            }
        }
        private Node RecursiveInsert(Node current, Node n)
        {
            if (current == null)
            {
                current = n;
                return current;
            }
            else if (n.data < current.data)
            {
                current.left = RecursiveInsert(current.left, n);
                current = balance_tree(current);
            }
            else if (n.data > current.data)
            {
                current.right = RecursiveInsert(current.right, n);
                current = balance_tree(current);
            }
            return current;
        }
        private Node balance_tree(Node current)
        {
            int b_factor = balance_factor(current);
            if (b_factor > 1)
            {
                if (balance_factor(current.left) > 0)
                {
                    current = RotateLL(current);
                }
                else
                {
                    current = RotateLR(current);
                }
            }
            else if (b_factor < -1)
            {
                if (balance_factor(current.right) > 0)
                {
                    current = RotateRL(current);
                }
                else
                {
                    current = RotateRR(current);
                }
            }
            return current;
        }
        public void Delete(int target)
        {//and here
            root = Delete(root, target);
        }
        private Node Delete(Node current, int target)
        {
            Node parent;
            if (current == null)
            { return null; }
            else
            {
                //left subtree
                if (target < current.data)
                {
                    current.left = Delete(current.left, target);
                    if (balance_factor(current) == -2)//here
                    {
                        if (balance_factor(current.right) <= 0)
                        {
                            current = RotateRR(current);
                        }
                        else
                        {
                            current = RotateRL(current);
                        }
                    }
                }
                //right subtree
                else if (target > current.data)
                {
                    current.right = Delete(current.right, target);
                    if (balance_factor(current) == 2)
                    {
                        if (balance_factor(current.left) >= 0)
                        {
                            current = RotateLL(current);
                        }
                        else
                        {
                            current = RotateLR(current);
                        }
                    }
                }
                //if target is found
                else
                {
                    if (current.right != null)
                    {
                        //delete its inorder successor
                        parent = current.right;
                        while (parent.left != null)
                        {
                            parent = parent.left;
                        }
                        current.data = parent.data;
                        current.right = Delete(current.right, parent.data);
                        if (balance_factor(current) == 2)//rebalancing
                        {
                            if (balance_factor(current.left) >= 0)
                            {
                                current = RotateLL(current);
                            }
                            else { current = RotateLR(current); }
                        }
                    }
                    else
                    {   //if current.left != null
                        return current.left;
                    }
                }
            }
            return current;
        }
        public void Find(int key)
        {
            if (Find(key, root).data == key)
            {
                Console.WriteLine("{0} was found!", key);
            }
            else
            {
                Console.WriteLine("Nothing found!");
            }
        }
        private Node Find(int target, Node current)
        {

            if (target < current.data)
            {
                if (target == current.data)
                {
                    return current;
                }
                else
                    return Find(target, current.left);
            }
            else
            {
                if (target == current.data)
                {
                    return current;
                }
                else
                    return Find(target, current.right);
            }

        }
        public void DisplayTree()
        {
            if (root == null)
            {
                Console.WriteLine("Tree is empty");
                return;
            }
            InOrderDisplayTree(root);
            Console.WriteLine();
        }
        private void InOrderDisplayTree(Node current)
        {
            if (current != null)
            {
                InOrderDisplayTree(current.left);
                Console.Write("({0}) ", current.data);
                InOrderDisplayTree(current.right);
            }
        }
        private int max(int l, int r)
        {
            return l > r ? l : r;
        }
        private int getHeight(Node current)
        {
            int height = 0;
            if (current != null)
            {
                int l = getHeight(current.left);
                int r = getHeight(current.right);
                int m = max(l, r);
                height = m + 1;
            }
            return height;
        }
        private int balance_factor(Node current)
        {
            int l = getHeight(current.left);
            int r = getHeight(current.right);
            int b_factor = l - r;
            return b_factor;
        }
        private Node RotateRR(Node parent)
        {
            Node pivot = parent.right;
            parent.right = pivot.left;
            pivot.left = parent;
            return pivot;
        }
        private Node RotateLL(Node parent)
        {
            Node pivot = parent.left;
            parent.left = pivot.right;
            pivot.right = parent;
            return pivot;
        }
        private Node RotateLR(Node parent)
        {
            Node pivot = parent.left;
            parent.left = RotateRR(pivot);
            return RotateLL(parent);
        }
        private Node RotateRL(Node parent)
        {
            Node pivot = parent.right;
            parent.right = RotateLL(pivot);
            return RotateRR(parent);
        }
    }
}



class List
    {
        public class Person
        {
            public string FirstName { get; set; }
            public string LastName { get; set; }
            public string Number { get; set; }

           
            public Person PrevNode { get; set; }

            
            public Person NextNode { get; set; }

            public Person(string firstName, string lastName, string Number, Person prevNode)
            {
                FirstName = firstName;
                LastName = lastName;
                Number = Number;

                
                PrevNode = prevNode;
            }
        }

        public class LinkedList
        {
            
            public Person FirstNode { get; set; }

            
            public Person CurrentNode { get; set; }

            
            public Person LastNode { get; set; }

            public bool _NextNodeFlag = false;

            public LinkedList(Person fistNode)
            {
                
                FirstNode = fistNode;
                CurrentNode = fistNode;
                LastNode = fistNode;
            }

            public void AddNode(Person person)
            {
               
                if (CurrentNode.NextNode == null)
                {
                    CurrentNode = CurrentNode.NextNode = person;
                    LastNode = person;
                }
                
                else
                {
                    Person tempNextNode = CurrentNode.NextNode;
                    CurrentNode = person;
                    CurrentNode.NextNode = tempNextNode;
                }
            }

            public bool NextNode()
            {
                if (!_NextNodeFlag)
                    CurrentNode = FirstNode;

                if (CurrentNode.NextNode != null)
                {
                    CurrentNode = CurrentNode.NextNode;

                    _NextNodeFlag = true;
                    return true;
                }

                _NextNodeFlag = false;
                return false;
            }

            

        }
    }
}

These are the linked list and avl tree codes. I tried to add the number and first name and surname data as requested in the question. I know the rough code of the B+ tree structure, but I did not implement it. Because I do not know how to relate these data structures to each other.
You can help as pseudo code, but I want to experiment on real code. Because I don't know how to find time complexity and execution time. I'm waiting for your help on this.
This is the traversel code of a b+ tree, but I have no idea how to code the b+tree. I only know how b+ trees work.
function search(k) is
    return tree_search(k, root)
function: tree_search(k, node) is
    if node is a leaf then
        return node
    switch k do
    case k ≤ k_0
        return tree_search(k, p_0)
    case k_i < k ≤ k_{i+1}
        return tree_search(k, p_{i+1})
    case k_d < k
        return tree_search(k, p_{d})

