In C++ Write a video provider program in C++ that uses Binary Search Tree such as displaylnOrder(); displayPreOrder(); displayPostOrder(); etc... that keeps track of the number of "likes" and "views" for their videos. Write a program that will read the name, number of views, and number of likes for a group of videos from a file named "videos.txt", formatted as shown below (without the headings): Likes Views Title 12 34 Spring Break! 296 1094 Journey through Yellowstone 75 837 Anniversary in Cancun 3879 29389 Tail of Two Travellers 618 7832 Zoo Keepers Use a structure to hold the items listed above for each video along with a left and right pointer. This will be the TreeNode struct for your BST class. Insert nodes into the BST alphabetically, by title. Display a menu which allows the user to choose one of the following options: Print the Title field of the root node. Display the information for all Videos, in alphabetical order by title. Display the information for a particular title (partial match – use .find) Display the total number of likes and views for the videos Exit the program.
Types of Linked List
A sequence of data elements connected through links is called a linked list (LL). The elements of a linked list are nodes containing data and a reference to the next node in the list. In a linked list, the elements are stored in a non-contiguous manner and the linear order in maintained by means of a pointer associated with each node in the list which is used to point to the subsequent node in the list.
Linked List
When a set of items is organized sequentially, it is termed as list. Linked list is a list whose order is given by links from one item to the next. It contains a link to the structure containing the next item so we can say that it is a completely different way to represent a list. In linked list, each structure of the list is known as node and it consists of two fields (one for containing the item and other one is for containing the next item address).
Step by step
Solved in 2 steps