Python interview with a Slack engineer: Transformation dictionary



Check out the feedback by the Slack interviewer and the full transcript on https://interviewing.io/recordings/Python-Slack-1/

This is a recording of a mock interview in Python by a senior Slack engineer on https://interviewing.io. Interviewing.io offers senior engineers free, anonymous technical interview practice with engineers from Facebook, Google, and more.

Disclaimer: All interviews conducted on interviewing.io are anonymous. In this case, we got explicit permission from the…

Related Posts

11 Comments

  1. my non-fancy solution:
    def trans(w1,w2,words):
    print("this is word1: %s" % w1)
    for l in range(len(w1)):
    x = list(w1)
    for i in range(ord('a') , ord('z')+1):
    x[l] = chr(i)
    print("word 1: %s —> %s" % (w1 , x ))
    if "".join(x) in words and "".join(x) != w1:
    c=0
    for wo2 in range(len(w2)):
    print(w2[wo2],x)
    if w2[wo2] in x:
    c +=1
    if c >= 2:
    print("you might have found the match [[ %s ]]" % "".join(x))
    return True
    else:
    print("w1: %s this is in else: %s" % (w1, "".join(x)))
    words.remove("".join(x))
    if trans("".join(x),"hat",words) == True:
    return True
    else:
    return False

    print(trans("dog","hat",['dot','cat','hot','hog','eat','dug','dig']))

Leave a Reply

Your email address will not be published.

© 2022 Code As Pro - Theme by WPEnjoy · Powered by WordPress