To transfer google play balance, opinion rewards or gift cards to PayPal, Paytm, PhonePe, Google Pay or any UPI ID linked bank account , you can use QxCredit :Rewards Convertor app which is available on google play store: You will get back 80% of the google play balance. App link: https://play.google.com/store/apps/details?id=qxcoding.qx_credit_reboot Follow these steps to transfer your play balance to paypal or UPI: 1) download app from play store. 2) login with your google account and phone number. 3) choose a token amount which you want to convert/transfer. 4) Enter your payout details.(UPI ID or PayPal Email) 5) wait for an acknowledgement mail form qxcredit containing information about your purchased token. 6) you will receive the amount within 3 days. 7) if you face any issues you can raise a query on website: https://qx-credit.web.app/#/contact_support About app: Introducing QxCredit : Rewards Converter Convert /Transfer or Exchange your Google Play Balance and opini...
Node definition (Structure) :
struct node{
int num;
node* next;
};
The num variable stores the data given by the user and the pointer (next) stores the address of the next element present in the linked list.
Insertion in between nodes (After a given node ) :
void insert_inBetween(){ int cvalue,value; cout<<"Enter the value after which you want to insert the new node"<<endl; cin>>cvalue; cout<<"enter the value of new node: "; cin>>value; cout<<endl; node *n,*prev; n->num=value; if(prev=find(cvalue,0)){ n->next = prev->next; prev->next=n; cout<<"node inserted succesfully"; } else{ cout<<"Node value not found"; } }
for performing the insertion after an element given by the user , we need to know the location of the node after which it is to be inserted, for this another function (find()) will be called which will return the address of the node after which we have to insert the new node.
the function ( find() ) accepts two arguments value and the relative position of node (-1,0,1).
-1 : return the previous node
0 : return the current node
1 : return the next node
node* find(int cvalue,int p){ node* temp=first; node* prev; prev=temp; while(temp){ if(temp->num==cvalue){ if(p==-1) return prev; if(p==0) return temp; if(p==1) return temp->next; } prev=temp; temp=temp->next; } return NULL; }
Now, after finding the location of node we just have to assign the current node's next value to the node after (prev) (the node where the value given by the user is stored ) .
and then link the new node (current) address to the prev->next to complete the joining in linked list.
Deletion in between nodes :
void delete_node(){ int dValue; cout<<"Enter the value you want to delete; "; cin>>dValue; if(first->num==dValue){ node* t1=first; first=first->next; delete(t1); } else{ node* prev=find(dValue,-1); node* dNode=prev->next; if(prev!=NULL){ prev->next=dNode->next; delete(dNode); } else cout<<"Value not found"<<endl; } }
Here, also the find() function is called with parameter (-1) (ie: The function will return the node which comes before the node which is to be deleted )
if the node with the required value is found then first ,the previous node (returned by find()) will be linked with the next node of node(going to be deleted) and then the memory is de-allocated for dNode .
if any doubts or queries please comment
Comments
Post a Comment