Arrange Consonants and Vowels

question->https://practice.geeksforgeeks.org/problems/arrange-consonants-and-vowels/1/?category[]=Linked%20List&category[]=Linked%20List&problemStatus=unsolved&difficulty[]=0&page=1&query=category[]Linked%20ListproblemStatusunsolveddifficulty[]0page1category[]Linked%20List#
code–>
https://ide.codingblocks.com/s/404425
Showing TLE Help

Hey @sheikhhaji18

if(fun(temp)){

          prev1->next=new Node(temp->data);

          prev1=prev1->next;//updated

          temp=temp->next;

      }

      else{

          prev2->next=new Node(temp->data);

          prev2=prev2->next;//updated

          temp=temp->next;

      }

thanks @Kartikkhariwal1

1 Like

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.