Размер видео: 1280 X 720853 X 480640 X 360
Показать панель управления
Автовоспроизведение
Автоповтор
Let's Connect 🤝 :LinkedIn : www.linkedin.com/in/rochak-vyas17/Code :-struct Node *insert(struct Node *head, int data) { Node* newnode=new Node(data); newnode->npx=XOR(NULL,head); if(head!=NULL){ Node* temp=XOR(head->npx,NULL); head->npx=XOR(temp,newnode); } head=newnode; return head;}vector getList(struct Node *head) { vectorans; Node* prev=NULL; while(head!=NULL){ ans.push_back(head->data); Node* temp=head; head=XOR(prev,head->npx); prev=temp; } return ans;}
Let's Connect 🤝 :
LinkedIn : www.linkedin.com/in/rochak-vyas17/
Code :-
struct Node *insert(struct Node *head, int data) {
Node* newnode=new Node(data);
newnode->npx=XOR(NULL,head);
if(head!=NULL){
Node* temp=XOR(head->npx,NULL);
head->npx=XOR(temp,newnode);
}
head=newnode;
return head;
}
vector getList(struct Node *head) {
vectorans;
Node* prev=NULL;
while(head!=NULL){
ans.push_back(head->data);
Node* temp=head;
head=XOR(prev,head->npx);
prev=temp;
}
return ans;
}