Question

In C programming, If you wanted to create a memory implementation of the subway map of...

In C programming, If you wanted to create a memory implementation of the subway map of NYC what type of data structure seems most useful? Can you describe at a high level how you might achieve this using a multilinked linked list? If you did how would you use this implementation to list transfer points between trains?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Yes we can implement subway map of NYC using multilinked linked list. Here we can implement every station as a node. And they will be linked in form of connecting trains. If there is a train direct from station A to station B, they must be linked. The first node is list must be a dummy one which will point to all nodes who are not linked by any other nodes i.e indicate stations from where trains start. In this way you will have a bag of stains (nodes) liked by links (trains).

Add a comment
Know the answer?
Add Answer to:
In C programming, If you wanted to create a memory implementation of the subway map of...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Describe how you would approach the implementation of an Electronic Health Record (EHR), create a list...

    Describe how you would approach the implementation of an Electronic Health Record (EHR), create a list of tasks that need to be done (project milestones) to achieve this implementation. Who are the subject matter experts that need to be included in this decision-making process? Develop a high-level implementation plan that includes the project milestones (key tasks) that will need to be accomplished. Discuss how long you project this project will take by preparing a timeline for your tasks. Include a...

  • This programming problem deals with the Linked List (LLStack) implementation. a. Create a simple user interface...

    This programming problem deals with the Linked List (LLStack) implementation. a. Create a simple user interface to allow a user to input an expression and store it as a string variable. b. Write a function using the LLStack implementation to check if the input string is a well-formed parenthetical expression. Assume (), {}, and [] are all parenthetical characters. Recall that a parenthetical expression is well-formed if i. All closing parentheses match the most recent, unmatched opening parentheses of the...

  • * C PROGRAMMING* Outcomes: Demonstrate the ability to create and use linked lists in dynamic memory...

    * C PROGRAMMING* Outcomes: Demonstrate the ability to create and use linked lists in dynamic memory Demonstrate the ability to add nodes and remove nodes from a linked list of structs Program Specifications: Write a program that creates the following struct (you can give it whatever name you want): char name[100]; int age; float weight; Create the following menu system: Add a Record Display All Records Quit When the user selects (1) you will prompt them for a name, age,...

  • C++ Linked List Implementation Motivation As we discussed in class, the data structures that you use...

    C++ Linked List Implementation Motivation As we discussed in class, the data structures that you use to implement your program can have a profound impact on it's overall performance. A poorly written program will often need much more RAM and CPU time then a well-written implementation. One of the most basic data structure questions revolves around the difference between an array and a linked list. After you finish this assignment you should have a firm understanding of their operation. Problem...

  • Using C Programming Assignment: Implementing a Reliable Transport Protocol Overview In this laboratory programming assignment, you...

    Using C Programming Assignment: Implementing a Reliable Transport Protocol Overview In this laboratory programming assignment, you will be writing the sending and receiving transport-level code for implementing a simple reliable data transfer protocol. There are two versions of this lab, the Alternating-Bit-Protocol version and the Go- Back-N version. This lab should be fun since your implementation will differ very little from what would be required in a real-world situation. Since you probably don't have standalone machines (with an OS that...

  • Please use C++ CS3358 Insert and delete a node Programming Project 2: The linked list -...

    Please use C++ CS3358 Insert and delete a node Programming Project 2: The linked list - Reference: chapter 18: Create an array of 15 student records that should not be sorted Create a liked list of 15 student record nodes. Each node is a node of one student record from the above unsorted array. The list of student records should be sorted by student ID. (Insert function without sort function to create a linked list.) (If you insert correctly, the...

  • Creating linked list data structure Overview The purpose of this assignment is for you to write...

    Creating linked list data structure Overview The purpose of this assignment is for you to write a data structure called a Linked List, which utilizes templates (similar to Java’s generics), in order to store any type of data. In addition, the nature of a Linked List will give you some experience dealing with non-contiguous memory organization. This will also give you more experience using pointers and memory management. Pointers, memory allocation, and understand how data is stored in memory will...

  • Please write a c++ header file, class implementation file and main file that does all of...

    Please write a c++ header file, class implementation file and main file that does all of the following and meets the requirements listed below. Also include a Output of your code as to show that your program works and functions properly. EXERCISING A DOUBLY-LINKED LIST CLASS This project consists of two parts, the second of which appears below. For the first part, write a class that implements an unordered list abstract data type using a doubly-linked list with pointers to...

  • C++ program, inventory.cpp implementation Mostly need the int load(istream&) function. Implementation: You are supp...

    C++ program, inventory.cpp implementation Mostly need the int load(istream&) function. Implementation: You are supposed to write three classes, called Item, Node and Inventory respectively Item is a plain data class with item id, name, price and quantity information accompanied by getters and setters Node is a plain linked list node class with Item pointer and next pointer (with getters/setters) Inventory is an inventory database class that provides basic linked list operations, delete load from file / formatted print functionalities. The...

  • C++ programming language: In this program you will create a simplified bag that acts like a...

    C++ programming language: In this program you will create a simplified bag that acts like a stack meaning that the Last item inserted is the First Item that comes out. Your backend implementation must use a linked list. The code should pass the test (there's only 1) and there should be no memory leaks. Note that passing the test does not ensure full credit! The functions are listed in the suggested order of implementation but you may implement them in...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT