Stuck on a problem

Revision en1, by -VIBE, 2023-02-14 21:06:52

Can anyone help me with my last submission. Approach-> 1)Lets take any two strings(say s1 and s2). 2)Now create a string ans from s1 and s2 by taking first character from s1 and then s2 and then repeat. At last we have size of our string ans=4*n. 3)Now i will pair the consecutive same number in the ans string. 4)Now if size of ans is less than or equal to 3*n then it will be my ans otherwise i will create my ans string from s2 and s3,then check for it and lastly check for s1 and s3. Note-> A number can only be paired once. Thanks in advance

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English -VIBE 2023-02-14 21:06:52 572 Initial revision (published)