B. Substring and Subsequence - Educational Codeforces Round 167

Sdílet
Vložit
  • čas přidán 27. 07. 2024

Komentáře • 11

  • @cp_with_vkd
    @cp_with_vkd  Před měsícem +1

    My Submission Link : codeforces.com/contest/1989/submission/267765133

  • @user-ln7we1vn1j
    @user-ln7we1vn1j Před měsícem

    Helpful !

  • @ShreyaSingh-fz6ho
    @ShreyaSingh-fz6ho Před měsícem +1

    Please upload video for D

  • @cper-pi2sz
    @cper-pi2sz Před měsícem

    Thanks please upload for C and D also

  • @uddipan7427
    @uddipan7427 Před měsícem

    why does the longest common substring approach don't work

    • @cp_with_vkd
      @cp_with_vkd  Před měsícem

      please write your approach in brief

  • @Sai-ir8yh
    @Sai-ir8yh Před měsícem

    Could u pls tell why this doesnt work?
    cin>>a>>b;
    ans = a.length();
    for(int i=0;i

    • @Sai-ir8yh
      @Sai-ir8yh Před měsícem

      i cant think of any test case which doesn't work. so can anyone find out the wrong test case?

    • @cp_with_vkd
      @cp_with_vkd  Před měsícem

      In subsequence, order of characters should be maintained....at a glance I think this is the error in the code.. .....as you are using frequency array so there might be error in ordering
      I'll try to find the test case tommorow...

    • @Sai-ir8yh
      @Sai-ir8yh Před měsícem

      @@cp_with_vkd Thank you, it would be very helpful. Actually all testcases i can think of, pass

    • @kohinoor9647
      @kohinoor9647 Před 29 dny

      @@Sai-ir8yh a=cabcefg b=bcaefg answer should be 8 ur code will give wrong answer :)