The following program creates a Binary search tree fromthe alternating_order.txt file.Then it converts the BST into a double linked list. How canI Implement a second find/searchmethod which uses the ordered doubly-linked listinformation?
CODE:
# include <iostream>
# include <cstdlib>
#include <string>
#include <fstream>
using namespace std;
int totalCounter = 0;
int successCounter = 0;
int successes = 0;
int SCounter = 0;
int failCounter = 0;
int fails = 0;
int FCounter = 0;
//Node using Struct
struct node
{
int data;
struct node *left;
struct node *right;
}*root = NULL;
// method to insert Element into the Tree
void insert(node *tree, node *newnode)
{
if (root == NULL)
{
root = new node;
root->data = newnode->data;
root->left = NULL;
root->right = NULL;
//cout << “Root Node is Added” <<
PayPal Gateway not configured
PayPal Gateway not configured