Answered step by step
Verified Expert Solution
Question
1 Approved Answer
data structures in c++ INVOLVES lists, Circular linked list doubly linked list QUESTION: 11 The text edited by a line editor is represented by a
data structures in c++
Chapter 6 Lists Plus 11. The text edited by a line editor is represented by a doubly linked list of noda each of which contains an 80-column line of text (type LineType). There is external pointer (type LineType") to this list, which points to the "current": in the text being edited. The list has a header node, which contains the string "- - - Top of File - - -" and a trailer node, which contains the string "- - - Bottom of File - - - a. Draw a sketch of this data structure. b. Write the type declarations to support this data structure. c. Write the class constructor, which sets up the header and trailer nodes. d. Code the following operations: Go To Top(LineType* linePtr) Function: Goes to the top of the list. Postcondition: currentLine is set to access the first line of text. GoToBottom(Line Type* linePtr) Function: Goes to the bottom of the list. Postcondition: currentLine is set to access the last line of text. e. Describe the operations in part (d) in terms of Big-O notation. How could you change the list to make these operations 0(1)? f. Code the InsertLine operation, using the following specification: InsertLine(LinePtrType linePtr, Line Type newLine) Function: Inserts newLine at the current line. Postconditions: newLine has been inserted after currentLine currentLine points to newLine. g. What other member functions should be included INVOLVES lists, Circular linked list doubly linked list
QUESTION:
11
The text edited by a line editor is represented by a doubly the link list of nodes, each of which contains an 80 column line of text (type lineType). There is one external pointer (type LineType*) to this list which points to the "current" line in the text being edited. the list has a header node, which contains the string .....
SEE PIC
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started