FastPrepFind Every Reachable Derived Vocabulary Word
Problems/Find Every Reachable Derived Vocabulary Word

Find Every Reachable Derived Vocabulary Word

Duolingo logoDuolingo● MediumINTERNPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: The reported one-letter rearrangement and the full list of reachable words match at about 85%. We kept the relation from the report, two to wout. We wrote the examples that have a full function setup. We chose these rules. Intermediate words must be listed. Labels are unique and lowercase. The output is sorted. There are input limits.

A word directly derives from another word when it can be formed by rearranging all of that word's letters and adding exactly one new letter. Keep every existing letter, including repeated copies. You cannot remove or replace any of them.

Given start and vocabulary, return every vocabulary word reachable from start through one or more direct derivations.

For this exercise, assume every intermediate and resulting word after start must be listed in vocabulary. The start need not be listed. Equal-length anagrams of start are not derivatives because every step adds one letter.

For this exercise, assume vocabulary labels are unique and all words are nonempty lowercase English strings of length at most 12. Return each reachable word once in alphabetical order; an empty vocabulary returns an empty array.

Function

deriveVocabulary(start: String, vocabulary: String[]) → String[]

Examples

Example 1

start = "two"vocabulary = ["wout"]return = ["wout"]

two reaches wout: rearrange the letters and add u.

Example 2

start = "two"vocabulary = ["woutx","two"]return = []

This example has no listed intermediate of length four, so woutx is unreachable under the declared vocabulary-step rule.

Example 3

start = "ab"vocabulary = ["abcd","acb","abc","bca"]return = ["abc","abcd","acb","bca"]

This example reaches three anagrams directly and abcd through a listed length-three intermediate.

Constraints

  • For this exercise, assume 0 <= vocabulary.length <= 200.
  • 1 <= start.length, vocabulary[i].length <= 12; every character is a lowercase English letter.
  • Vocabulary words are unique, and every intermediate after start must be a vocabulary word.

More Duolingo Phone Screen questions

  • Rank Word-Translation Hints from Sentence TranslationsPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Group Timestamps into Consecutive-Day IntervalsPHONE SCREEN · Seen Nov 2026
  • Return Every Matching DecryptionPHONE SCREEN · Seen Nov 2026
  • Visit Desired Attractions Without Reusing a TrailPHONE SCREEN · Seen Oct 2026
  • Correct an In-Place Array ReversalPHONE SCREEN · Seen Oct 2026
  • Count Starts Reaching a Grid MaximumPHONE SCREEN · Seen Oct 2026
  • Select the Top User MatchesPHONE SCREEN · Seen Oct 2026
  • Sum All Values in a Binary TreePHONE SCREEN · Seen Oct 2026
  • User Resource Transition ProbabilitiesPHONE SCREEN · Seen Oct 2026
  • Encrypt and Decrypt StringsPHONE SCREEN · Seen Apr 2026

Similar questions at other companies

  • Resource Transition ProbabilitiesWhatNot · PHONE SCREENWhatNot interview questions
  • Mutual-Friend Referral RecommendationsFireworks AI · PHONE SCREEN · ONSITE INTERVIEW
  • Linked Merchants Within Two HopsStripe · PHONE SCREENStripe interview questions
  • Mutual-Friend RecommendationsMeta · PHONE SCREEN · ONSITE INTERVIEWMeta interview questions
  • In-Memory Filesystem CommandsPerplexity AI · PHONE SCREEN · ONSITE INTERVIEWPerplexity AI interview questions
  • Group AnagramsWorkday · PHONE SCREEN
  • Resolve Variable Equations with Dependency ErrorsApplied Intuition · PHONE SCREENApplied Intuition interview questions
  • Nested Substitutions with Cycle DetectionKikoff · PHONE SCREENKikoff interview questions
  • Evaluate Formulas with Cycle DetectionInstacart · PHONE SCREEN · ONSITE INTERVIEWInstacart interview questions
  • Time-Aware Search AutocompleteRoblox · PHONE SCREENRoblox interview questions

Duolingo interview experiences

  • Duolingo interviews · November 2026
  • Duolingo SWE Interview Questions: 3 Experiences
All Duolingo interview questionsSee Duolingo hiring insights
Saved
class Solution {
    public String[] deriveVocabulary(String start, String[] vocabulary) {
        // Write your code here.
        return new String[0];
    }
}
Checking account…