Amazon Interview Expertise – GeeksforGeeks

    0
    45


    View Dialogue

    Enhance Article

    Save Article

    Like Article

    View Dialogue

    Enhance Article

    Save Article

    Like Article

    right here’s a query that was not too long ago requested by amazon. The place was for SDE II, L-5, United States. The query was in two components. You’re given a string and a wordlist. The string is a mixture of phrases from the thesaurus. Your objective is to

    • Discover the phrases that had been used to create the string
    • For every of these phrases, discover the subsequent closest phrase to it from the wordlist (Minimal edits)

    Instance: Glossary [“tree”, “apple”, “orange”, “big”, “bigger”, “biggest”, “fast”, “faster”, “fastest”, “cat”, “cart”]

    • String = “fasterbiggercat”
    • Phrases used to type string = sooner, larger, cat
    • Closest edits to every phrase = quickest (2 edits), largest (2 edits), cart (1 edit)
    • Return fastestbiggestcart

    LEAVE A REPLY

    Please enter your comment!
    Please enter your name here