Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

write C++ code below 1. The design of array-based list 1) Complete array-based list and define corresponding class and member functions by using the definition

write C++ code below

1. The design of array-based list

1) Complete array-based list and define corresponding class and member functions by using the definition and implementation method in the teaching material.

2) Write the main program, input an array-based list and an integer, find whether the integer exists in the list. If it exists, delete it and print the deleted linear list.

2. The design of singly-linked list

1) Complete singly-linked list and define corresponding class and member functions by using the definition and implementation method in the teaching material.

2) Write a function to insert an integer into a singly-linked list of elements arranged from largest to smallest. Requires that elements remain ordered after insertion.

3. The design of array-based stack

1)Complete array-based stack and define corresponding class and member functions by using the definition and implementation method in the teaching material.

2)Write a function that uses the stack to check whether the parentheses in the string are balanced. For example, "(()(()))" is balanced, and "(()()" and "())" are unbalanced.

4. The design of array-based queue

1) Complete array-based queue and define corresponding class and member functions by using the definition and implementation method in the teaching material.

2) Write a function that the user selects queue i (0i9), and then inserts any number of numbers into queue i. Input "#" to indicate that the user does not select any queue. At the end of the program, the non-empty queue among the 10 queues is output in the order of queue number from the smallest to the largest.

For example

Input

0(queue number)

1 3 5 7 9 8

1(queue number)

2 4 6

9(queue number)

111 222 333

#

Output

1 3 5 7 9 8 2 4 6 111 222 333

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

More Books

Students also viewed these Databases questions