Question: 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

Please use C language DATA STRUCTURE Assignment 4 - Singly Linked List

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!