TopText Publishing is a textbook publishing company with a headquarters location, a warehouse, and three sales offices that each have a sales manager and sales reps. TopText sells to schools, colleges, and individual customers. Many authors write more than one book for TopText, and more than one author writes some books. TopText maintains an active list of more than 100 books, each identified by a universal code called an ISBN. You have been asked to draw an ERD for the TopText information system and to include cardinality notation in your diagram.
Q: Write a function that has two linked-list head pointers as parameters. Assume that the linked list's…
A: THE ANSWER IS
Q: Given a pointer to the head of a linked list and a specific position, determine the data value at…
A: The program is written in c++ Singly linked list does not provide backward traversing. so the list…
Q: A linked list is developed with the following set of nodes in sequence: 25, 40, 66, 38 and 53. The…
A: A linked list is a sequence of data structures, which are connected together via links. Linked List…
Q: Given a pointer to the head of a singly-linked list, print each data value from the reversed list.…
A: Objective: This program would create a single linked list and display its content in the opposite…
Q: Write a program in C on linked lists based on the following details: • Create a global…
A: Hello Student. Greetings from my side. Hope you are doing great. I will try my best to answer your…
Q: Given the pointer to the head node of a linked list, change the next pointers of the nodes so that…
A: The first line contains an integer, denoting the number of test cases. Each test case is of the…
Q: Which of the following structures is limited to access elements only at structure end? O a. Both…
A: The correct answer along with the explanation is given below:
Q: Define the rule echo(LST0, LST1). This rule describes LST1, which holds all the same elements as…
A: - PROLOG is an acronym of Programming in Logic. Prolog programming is a sequence of rules and facts.…
Q: Write a C++ program to implement movie rent store, using Linked List, which will allow the store…
A: using Linked List, which will allow the store owner to perform the following functions:a) Insert the…
Q: Given a pointer to the head of a linked list and a specific position, determine the data value at…
A: Below is the implementation of the method getNode() in the C++ program: - Approach of the getNode…
Q: 2. You are given the following problem description. Complete the following Java function to handle…
A: Q: Solve the given problem using Collections framework
Q: Suppose that you are given the following doubly linked list implementation that uses head and tail…
A: I have implemented the given requirements in C++ as per the instruction. The code is as follows:…
Q: Write a program that will use the hash function “H (key) =key mod 20” to create bank application…
A: The program will generate 4 digit account numbers with the use of below three hashing techniques.…
Q: submit a python code that performs the required functions. Q2) Write a member functions to the class…
A: int data struct node *next Node*/ int sumOfEven(Node *head) if(!head) return 0 Node *temp= head;…
Q: Write a program which will concatenate two single linked lists. The structure is defined below.…
A: The C program is written for concatenation of two single linked list. The program takes the input…
Q: Suppose, alist is a 2-dimensional list that is defined as follows. alist = [ [1], [2,3], [5,6,7]…
A: The correct option along with the explanation is given below.
Q: e have a list. For example [2,4,6,6,8,2,12,54,15]. Without repeating the elements in the list A…
A: Note: Since no programming language is mentioned. I am attempting this in python. if you need it in…
Q: Implement the function below void swap(int pos1, int pos2) {}
A: void swap(node** hRef, int pos1, int pos2){ // Nothing to do if pos1 and pos2 are same if…
Q: You have probably heard about the deque (double-ended queue) data structure, which allows for…
A: Given
Q: function to find and return a node, in a single linked list, that has a certain value node * lookup…
A: The code is below:
Q: Explain and diagrammatically illustrate the given program. int main() { struct node *rootNode…
A: The first few lines are used to create a binary tree. It looks like this The line…
Q: Write a sample function with one parameter that is a head pointer for a linked list of items. The…
A: THE ANSWER IS
Q: TRUE or FALSE? Answer the following question and state the reason why: The delete operation…
A: Linked List can be defined as collection of objects called nodes that are randomly stored in the…
Q: Refer to Chapter12 LList. Adding nodes to or removing nodes from a linked chain requires a special…
A: given program is in JAVA:-
Q: Write a function, to be included in an unsorted linked list class, called replace_item, that will…
A: Start Take the unsorted linked list Replace all occurences of old item Replace with new item Then…
Q: in C++ kth Element Extend the class linkedListType by adding the following operations: a. Write a…
A: (A) In this function, Initially, we declare a node called random and set it equal to the head of…
Q: In c++ , write a program to create a structure of a node, create a class Linked List. Implement all…
A: #include <iostream>using namespace std; struct Node{int data;Node *next;}; class…
Q: Write a program that reads in babynames.txt and produces two files, boynames.txt and girlnames.txt,…
A: # Create a bool variable to use as a flag. foundGirl = False # Get the search value from the…
Q: What would be the content of the list from left to right of the following code
A: In default constructor we are creating a node with name as null and in add method we are adding the…
Q: You are the manager of the train depot. One of your tasks is to efficiently order the train cars so…
A: #include <iostream>#include<string>#include<bits/stdc++.h>template<class…
Q: You are given the students.txt file which includes ids, names, and two grades (Math and Data…
A: ANSWER:-
Q: What will be the value of variable a after the following statements are executed: Node…
A: //Given that the pointer head is pointing to the first element of node Node<int>…
Q: 1. Write a function to search and return the node, in a single linked list, having a given value v…
A: Code :- #include <iostream> using namespace std; class LinkedList{ // linked list class…
Q: Given the following link list, please do the following: head 2000 2800 1500 3600 2000- 17 2800 92…
A: We need to answer the given questions and write code to insert a node in the middle of the linked…
Q: Assume you are writing code to maintain a linked list. You are to usea variable named head to always…
A: Create a class with name Linked_list and the within that class create rest of the classes a static…
Q: Write a function that has two linked-list head pointers as parameters. Assume that the linked list's…
A: The Answer is in Below Steps
Q: You will write a program to process the lines in a text file using a linked list ADT and raw…
A: Hey there, I am writing the required solution of the above stated question.Please do find the…
Q: # For simplicity, we'll use "Station" in our type contracts to indicate that # we mean a list…
A: Hi Dear!! Please Upvote!!…
Q: s an explanation of the code and its working details completely. It must contain the pictures of…
A: the code is an given below :
Q: There’s a somewhat imperfect analogy between a linked list and a railroad train, where individual…
A:
Q: In the Happy Valley School System, children are classified by age as follows: less than 2,…
A: We need to write a code for the given scenario. ***The language used is C++.
Q: Write a method for concatenating two singly linked lists L1 and L2, into a single list L3 that…
A: Algorithm: Create a method named concatenateSingleLists() Create a new singly list L3 Concatenate…
Q: Assume that, you have a Linked List class "LL" with a function named "fun1". You can assume that…
A: The correct answer is the sixth option which is 31 -> 32 -> 43 -> 34 -> 57 ->91. The…
Q: 1. Suppose you have already developed an SLL ADT. You have to search a specific element of the…
A: If users don't interchange the variables in a node: The same goal is to find x and y the fastest in…
Q: Using Dr-Racket, what is the purpose of the number function?
A: Given function (define (number n)(local [(define (abstract int)(* int 11))] (build-list n…
Q: given dictionaries, d1 and d2, create a new dictionary with the following property. For each…
A: Solution :: First of all you have written wrong spelling of python it's not puthon it's python ..…
Q: Write java programs for the following operations on Circular Linked List. (i) Creation (ii)…
A: The complete answer is given below:-
Q: 1. Assume you have the following singly linked List of integers and the method printLL(): Head ↓…
A: Given questions are not interlinked. As per our guidelines only one question will be answered. So,…
Q: Add the following functions and write a program to test these functions in the class…
A: a. Write the definition of a function that returns the data of the kth element of the linked list.…
Q: Write a C program to store, analyze and update Covid-19 information about Greater Toronto Area (GTA)…
A: Here I am attaching code for all required files:• functions.c• functions.h• main.c
TopText Publishing is a textbook publishing company with a headquarters location, a
warehouse, and three sales offices that each have a sales manager and sales reps. TopText
sells to schools, colleges, and individual customers. Many authors write more than one
book for TopText, and more than one author writes some books. TopText maintains an
active list of more than 100 books, each identified by a universal code called an ISBN.
You have been asked to draw an ERD for the TopText
cardinality notation in your diagram.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- Implement the function below void swap(int pos1, int pos2) {} For LinkedList, to maintain integrity of data in the structure, you are not to swap directly the element, nor remove a node. Instead, you are to only change the nodes' next pointers. Inital code to be completed: class LinkedList : public List { node* head; node* tail; int index; node* create_node(int num) { node* n = (node*) malloc(sizeof(node)); n->element = num; n->next = NULL; return n; } public: LinkedList() { index = 0; head = NULL; tail = NULL; } int add(int num) { addTail(num); return index; } int get(int pos) { node* currnode = head; int count =0; while (currnode != NULL){ count++; if (count == pos){ return currnode -> element; }else{ currnode = currnode -> next; } }…For this assignment, you need to implement link-based List and derivative ADTs in Java. To complete this, you will need the following: A LinkNode structure or class which will have two attributes - a data attribute and a pointer attribute to the next node. The data attribute of the LinkNode should be the Money class of Lab 1. A Singly Linked List class which will be composed of three attributes - a count attribute, a LinkedNode pointer/reference attribute pointing to the start of the list and a LinkedNode pointer/reference attribute pointing to the end of the list. Since this is a class, make sure all these attributes are private. The attribute names for the Node and Linked List are the words in bold in #1 and #2. For the Linked List, implement the most common linked-list behaviors as explained in class - getters/setters/constructors/destructors for the attributes of the class, (a) create new list, (b) add data, (c) delete data, (d) find data, (e) count of data items in the…Write a line of code in R that will change the Location column of the tibble in my_Costco_list to an ordered factor where the order of the levels is in the following order: Clothes, Cereal, Refrigerated. Then write a line of code using the previous line to compute the minimum amount of items (not the number of different items) required in each location. my_Costco_list <- list(tibble(Item = c("Milk", "Coffee", "Lettuce","Pants"),Amount = c(4,1,2,2),Location = c("Refrigerated","Cereal","Refrigerated","Clothes")))
- Suppose a list contains the final exam results of CSE110, PHY111, and MAT110 of each student in a listed form. Your task is to sort the list based on a course name that will be given by the user and print the names after sorting. For example, a list looks likelst = [ ["Farzad",95,87,91] , ["Mahjabin",92,90,83], ["Sadman",87,92,80], ["Nakhla",85,94,90] ]where for each list, 1st index is name, 2nd index is CSE110, 3rd index is PHY111 and 4th index is MAT110. ===================================================== Hint:create a python function for sorting, then call it everytime instead of rewriting the code. Get the data in the individual lists from the given nested list. ===================================================== Sample InputMAT110 Sample OutputFarzadNakhlaMahjabinSadmanGiven the following definitions that we have used in class to represent a doubly-linked, circular List with a dummy-header node that contains data of type "struct Student". typedef struct { char *name; char *major; } Student;typedef struct node { Student *data; struct node *next; struct node *prev; } Node;typedef struct { Node *header; int size; } LinkedList;LinkedList *roster; Here is a picture of what the Linked List might look like, although you should answer the following question for a general list (ie, that does not necessarily contain 3 data items). What TYPE of data is the following: *roster Group of answer choices int int * Node Node * Student Student * char char * This is legal code, but it does not match any of the types listed above. This is illegal code, and would produce a syntax error No hand written solution and no imageGiven the following definitions that we have used in class to represent a doubly-linked, circular List with a dummy-header node that contains data of type "struct Student". typedef struct { char *name; char *major; } Student; typedef struct node { Student *data; struct node *next; struct node *prev; } Node; typedef struct { Node *header; int size; } LinkedList; LinkedList *roster; Here is a picture of what the Linked List might look like, although you should answer the following question for a general list (ie, that does not necessarily contain 3 data items). What TYPE of data is the following: roster->header->data->next->next Group of answer choices int int * Node Node * Student Student * char char * This is legal code, but it does not match any of the types listed above. This is illegal code, and would produce a syntax error.
- Computer Science Describe a situation where you may wish to create a link list of ITERATORS. Is it possible to create a link list of various types of iterators? For example a list with list iterators, map iterators, and set iterators?Modify the given code to move the string from leftmost side to the rightmost side of the screen (no trails). Given Code: .model small.stack.data strg db 'Lemon$' row db 12 col db 0.codemain proc mov ax,@data mov ds,ax mov ah,6 mov al,0 mov bh,7 mov ch,0 mov cl,0 mov dh,24 mov dl,79 mov cx,40again:push cx mov ah,2 mov bh,0 mov dh,row ;row mov dl,col ;col int 10h mov ah,9 mov dx,offset strg int 21h inc col mov cx,10 push cx mov cx,0ffffhx: loop x pop cx loop y pop cx loop again mov ah,4ch int 21hmain endpend mainQ4 Suppose, alist is a 2-dimensional list that is defined as follows. alist = [ [1], [2,3], [5,6,7] ] Which is the best option to access the last element of the last element of this list (i.e., 7)? Question 4 options: alist[ len(alist) - 1 ][len(alist[len(alist) - 1]) - 1] alist[ len(alist) - 1 ][len(alist[len(alist) - 1])] alist[3][3] alist[ len(alist) - 1 ][1]
- You are going to implement a program that creates an unsorted list by using a linked list implemented by yourself. NOT allowed to use LinkedList class or any other classes that offers list functions. It is REQUIRED to use an ItemType class and a NodeType struct to solve this. Use C++, please read instructions carefully and new solution only! The “data.txt” file has three lines of data 100, 110, 120, 130, 140, 150, 160 100, 130, 160 1@0, 2@3, 3@END You need to 1. create an empty unsorted list 2. add the numbers from the first line to list using putItem() function. Then print all the current keys to command line in one line using printAll(). 3. delete the numbers given by the second line in the list by using deleteItem() function. Then print all the current keys to command line in one line using printAll().. 4. putItem () the numbers in the third line of the data file to the corresponding location in the list. For example, 1@0 means adding number 1 at position 0 of the list. Then…There’s a somewhat imperfect analogy between a linked list and a railroad train, where individual cars represent links. Imagine how you would carry out various linked list operations, such as those implemented by the member functions insertFirst(), removeFirst(), and remove(int key) from the LinkList class in this hour. Also implement an insertAfter() function. You’ll need some sidings and switches. You can use a model train set if you have one. Otherwise, try drawing tracks on a piece of paper and using business cards for train cars.Write in C++ Now, what if Sam wants to insert Eevee after Pikachu but he doesn't know where Pikachu is located in his list. Let's help him search for a Pokemon by its name and insert another Pokemon directly after it. Write a function secondPlace() that takes six parameters and inserts a new Pokemon into a list right after another specified pokemon. Once you find the specified Pokemon, use the insertAfter() function from the previous sub-question to add the new Pokemon. The function should return the new number of strings in the array. Note The same Pokemon may appear in the list multiple times (Sam has a bad memory). Assume that Sam wants every instance of the Pokemon he is searching for to be followed by the Pokemon he is attempting to insert. If the array is already full or if the number of strings that are going to be added to the array plus the current number of strings exceeds the total size of the array, the array should remain unchanged. Assume all inputs are lowercase…