- 2

Data structure question.please someone give the corresponding program to this question 🤧

Implement a singly linked list having all unique elements with the following operations. I 0 x – Inserts element x at the end. I 1 y x – If the element y exists, then insert element x after the element y, else insert element y before the existing element x. Assuming either the element x or the element y exists. I 2 z y x – Inserts element x in the middle of the elements z and y. The element z appears before the element y. U x p – Links the next pointer of the element x to the node lying at the pth position from the element x while traversing towards right. In case of insufficient number of nodes, the counting continues by updating the existing linked list to its circular version. Input: Line 1 contains an integer N indicating the total number of operations. Each of the following N lines contains an operation to be performed in the format as is described above. Output: Line 1 has 1 if the linked list gets updated to its circular version, else 0. Line 2 has a count of the number of nodes whose addresses are co

5th Oct 2020, 1:50 PM
Tøxïç Skíñfíé 😈
Tøxïç Skíñfíé 😈 - avatar
3 ответов
0
Nasif Rahman i tried shortcut 🤧 I didn't try yet..!🥺😬
5th Oct 2020, 1:55 PM
Tøxïç Skíñfíé 😈
Tøxïç Skíñfíé 😈 - avatar
0
Nasif Rahman 🤧🤧 thanku🥺
5th Oct 2020, 1:58 PM
Tøxïç Skíñfíé 😈
Tøxïç Skíñfíé 😈 - avatar
0
Nasif Rahman please check my code..😬
5th Oct 2020, 2:28 PM
Tøxïç Skíñfíé 😈
Tøxïç Skíñfíé 😈 - avatar