N Question-1: I want to keep in a linked list with very large numbers (not enough to hold with int, long int, etc.). format will be like: if the number is 34567890 then in the linked list it should be like : 3->4->5->6->7->8->9->0. Define the relevant data structure and add. Write a method that takes the two numbers that are kept as a list and returns the sums?
Question-2: The contents of a file named numbers.txt will contain one integer per line. Your program should read each number from left to right and add each digit as an element to the Queue data structure. Therefore, the number of lines in the file will create the queue object. These subsequent queues must be added to the binary search tree starting from the queue in the first row. In this case, each node of the binary search tree must hold an object that represents the Queue object as data. The rule for adding to a binary search tree must be based on the sum of the numbers contained in the queue. Since there are no two elements of the same value in the binary search tree, only one of the queues with equal totals should be added to the tree. Once all queues have been added, the Binary Search Tree inorder, preorder, and postorder should be read and printed on the screen. The value to be printed on the screen as node data is the sum of the digits in the queue
Question-3: The file "numbers.txt" will contain an integer on each line. But each of the numbers here int, long int and so on. is too large to hold with a data structure. The program will read the numbers and create the Heap tree. Then, sort by using Heap tree. It should write the numbers that are sorted from small to large in the sorted.txt file with one number per line. It will only display the largest number on the screen.
DescriptionIn this final assignment, the students will demonstrate their ability to apply two majorconstructs of the C programming language – Fu
Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t
Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th
1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of
1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of