Ad
  • Default User Avatar

    yeah actually i removed l from the outer loop though it had no effect and m just accumulates the words that are present in the dictionary
    but for cases like

    valid_word(['a', 'bgkol', 'a', 'k'],'aakbgkolbgkol')
    valid_word(['ab', 'a', 'bc'],'abc')
    

    it isn't working!

  • Default User Avatar

    this is the code above
    its not passing for test cases like these:

    print(valid_word(['a', 'bgkol', 'a', 'k'],'aakbgkolbgkol'))
    print(valid_word(['ab', 'a', 'bc'],'abc'))
    

    kindly review it Thanks!

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution