Skip to main content
All Questions

Given a list of words, find the longest chain in which each word is formed by inserting exactly one letter into the previous one.

Unlock detailed company stats for this questionUpgrade
You are given a list of words. One word is a predecessor of another if inserting exactly one letter into it, without reordering its other letters, gives the other word. Find the length of the longest chain of words in which each word is a predecessor of the next.

Community answers

No answers contributed by the community yet.

Related courses

Course

Behavioral Interviews: A Practical Guide for Engineers

Get offers at the level you deserve. Prep for senior+ behavioral interviews at FAANG and Tier-1 companies. Made with staff and principal engineers from Meta, Netflix, Google, and more. Avoid downleveling, elevate past projects, and stop sounding like a robot.

Course

Software Engineering Interview Prep

Land your dream software engineering role at Google, Amazon, Microsoft, Meta, Apple, and other top companies. Learn from mock interviews, frameworks, and advice from senior candidates—practice data structures, algorithms, system design, people management, behavioral interviews, and more.