sir why my test case are not passing output
is correct of it
String window code
In your code if the input is
ayupajhfkahfaf
aaf
Your output is : af
which is not correct
since each âaâ , âaâ, âfâ should occur so correct output would be : ahfaf
##hit the like button if this works
sir abhi bhi galat hai
sir so how to make my code correct
your code is not outputting the correct result
- apply two pointer method
- store all the results in some vector
- print the string with shortest size
sir maine two pointer method hi toh laggaya hai aur vector m tore karne ki jagga maine index le liya
pointer aur baad m jaa kar ushko print kar diya
I think you are not taking into consideration of all the characters.
you might be thinking that all the characters should appear in the string regardless of their count in second string(input).
But please consider the case in which all the characters in string2 should appear in the answer string with alt least the same count of characters as in string2(which you take input)
ok sir i got it thank you
hit a like button if this works for you
@YASHMATHURIA123
hey
if u face any problem please tell me
the editorial to the question is simple and short to understand
https://hack.codingblocks.com/app/contests/1454/363/problem
in the solutions tab u can read i t