Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use C language DATA STRUCTURE Assignment 4 - Singly Linked List Problem 1. Write a program to manage singly linked lists of integers p,

Please use C language

image text in transcribed

DATA STRUCTURE Assignment 4 - Singly Linked List Problem 1. Write a program to manage singly linked lists of integers p, p1 and p2 containing the following functionalities: a) Add an node at the beginning of p. b) Add an node at the end of p. c) Delete the first node from p. d) Delete the last node from p e) Print out p f) Count the number of node of p. g) Search for a given value; h) Search for a given position; i) Append p2 to the end of p1. j) Merge two sorted sigle linked lists p1 and p2. k) Delete an node from p at position n. 1) Insert into p an node at position n. Problem 2. A set is a list of elements, in which the order of elements is not important. We want to define a data structure for a set of integers and operations on it. Suppose that each set element appears exactly once. Write a program to to define set of integers using singly linked list. The program consists of the following functions: a) isset(s): check if s is a set or not. b) subset(s1, s2): check if set s1 is a subset of set s2. c) union(s1, s2); return the union of two sets s1 and s2. d) intersection(s1, s2); return the intersection of two sets s1 and s2

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

Microsoft Visual Basic 2017 For Windows Web And Database Applications

Authors: Corinne Hoisington

1st Edition

1337102113, 978-1337102117

More Books

Students also viewed these Databases questions

Question

Describe Table Structures in RDMSs.

Answered: 1 week ago