String window code

sir why my test case are not passing output
is correct of it

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

  1. apply two pointer method
  2. store all the results in some vector
  3. 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

If you require hint please go here String window problem

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