Professional Documents
Culture Documents
Ds Assign. No #4: Maria Sarfraz Shaikh 21510102 Sy Cse S6
Ds Assign. No #4: Maria Sarfraz Shaikh 21510102 Sy Cse S6
Ds Assign. No #4: Maria Sarfraz Shaikh 21510102 Sy Cse S6
No #4
#include<bits/stdc++.h>
#define jyot main
#define lupin(a,b,c) for(int(a)=(b);(a)<(c);(a)++)
#define lupim(a,b,c) for(int(a)=(b);(a)<=(c);(a)++)
#define emp emplace_back
#define MARIASHAIKH ios_base::sync_with_stdio(false) ;
#define Patil cin.tie(0);cout.tie(0) ;
#define khtm cout<<endl ;
#define int long long int
using namespace std;
class Node{
public:
int data;
Node* prev;
Node* next;
Node(int d){
this->data=d;
this->next=NULL;
this->prev=NULL;
}
};
int32_t maria(){
Node* node1=new Node(50);
Node* head=node1;
Node* tail=node1;
inathead(head,98);
inathead(head,5);
print(head); /************/
inattail(head,5,tail);
inattail(head,7,tail);
inattail(head,8,tail);
inattail(head,15,tail);
print(head); /************/
delathead(head);
print(head); /************/
delattail(head,tail);
print(head); /************/
inatmid(head,87,3);
print(head); /************/
deleteatmid(head,5);
print(head); /************/
return 0;
}
OUTPUT