Skip to content
Related Articles

Related Articles

Amazon Interview Experience

View Discussion
Improve Article
Save Article
  • Difficulty Level :Hard
  • Last Updated :23 Sep, 2022
View Discussion
Improve Article
Save Article

here’s a question that was recently asked by amazon. The position was for SDE II, L-5, United States. The question was in two parts. You are given a string and a wordlist. The string is a combination of words from the word list. Your goal is to

  • Find the words that were used to create the string
  • For each of those words, find the next closest word to it from the wordlist (Minimal edits)

Example: Word list [“tree”, “apple”, “orange”, “big”, “bigger”, “biggest”, “fast”, “faster”, “fastest”, “cat”, “cart”]

  • String = “fasterbiggercat”
  • Words used to form string = faster, bigger, cat
  • Closest edits to each word = fastest (2 edits), biggest (2 edits), cart (1 edit)
  • Return fastestbiggestcart
My Personal Notesarrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!