comefrom: <garvit244>30_1.py
code: def findSubstring( s, words):
      if not str or not words:
          return []
      
      counts = {}
      for word in words:
          if word in counts:
              counts[word] += 1
          else:
              counts[word] = 1
      
      result = []
      n, numOfWords, fixLen = len(s), len(words),len(words[0])
      
      for index in range(0, n-numOfWords*fixLen+1):
          seen = {}
      
          index_j = 0
          while index_j < numOfWords:
              word = s[index + index_j*fixLen: index + (index_j+1)*fixLen]
              if word in counts:
                  if word in seen:
                      seen[word] += 1
                  else:
                      seen[word] = 1
      
                  if seen[word] > counts[word]:
                      break
              else:
                  break
              index_j += 1
      
          if index_j == numOfWords:
              result.append(index)
      
      return
masked: def sample_funcname ( var_0 , var_1 ) :
      if not str or not var_1 :
          return [ ]
      var_3 = { }
      for var_4 in var_1 :
          if var_4 in var_3 :
              var_3 [ var_4 ] += 1
          else :
              var_3 [ var_4 ] = 1
      var_6 = [ ]
      var_8 , var_9 , var_11 = len ( var_0 ) , len ( var_1 ) , len ( var_1 [ 0 ] )
      for var_13 in range ( 0 , var_8 - var_9 * var_11 + 1 ) :
          var_14 = { }
          var_15 = 0
          while var_15 < var_9 :
              var_4 = var_0 [ var_13 + var_15 * var_11 : var_13 + ( var_15 + 1 ) * var_11 ]
              if var_4 in var_3 :
                  if var_4 in var_14 :
                      var_14 [ var_4 ] += 1
                  else :
                      var_14 [ var_4 ] = 1
                  if var_14 [ var_4 ] > var_3 [ var_4 ] :
                      break
              else :
                  break
              var_15 += 1
          if var_15 == var_9 :
              var_6.append ( var_13 )
      return
  