FastPrepFind Longest Chain
Problems/Find Longest Chain

Find Longest Chain

Bloomberg LP logoBloomberg LP● MediumFULLTIMEOA

Updated Jul 2026

QuestionFunctionExamplesConstraints

Problem statement

Given a dictionary of many words:

- bac, ac, a, c, bads

For each word, each time you can delete one letter, and the resulting word must still be in the dictionary. The task is to find the longest chain that can be formed.

Function

longestChain(words: String[]) → int

Examples

Example 1

words = ["bac", "ac", "a", "c", "bads"]return = 3

The longest chain that can be formed starting with "bac" is "bac" -> "ac" -> "a", which has a length of 3.

Constraints

🍓🍓

More Bloomberg LP interview questions

  • Pascal's TrianglePHONE SCREEN · ONSITE INTERVIEW · Seen Dec 2026
  • Valid Triangle NumberPHONE SCREEN · ONSITE INTERVIEW · Seen Dec 2026
  • Count Distinct Arrays After Decrement OperationsOA · Seen Nov 2026
  • Minimum BeautyOA · Seen Nov 2026
  • Collatz Conjecture with Shared MemoizationPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Word SearchOA · PHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • N-ary Index-Path Encoder and DecoderPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Top K Frequent WordsONSITE INTERVIEW · Seen Nov 2026
  • Trapping Rain WaterPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Fewest Coins CombinationPHONE SCREEN · Seen Nov 2026

Similar questions at other companies

  • Maximum Escape Game ScoreMicrosoft · OAMicrosoft interview questions
  • Longest String ChainVisa · OAVisa interview questions
  • Minimum Edit-Distance String for Each QueryTarget · OA
  • Maximum Taxi EarningsWells Fargo · OAWells Fargo interview questions
  • Max Sum of Non-Overlapping IntervalsAmazon · OA
  • Maximize Power Values Sum 🪴Google · OAGoogle interview questions
  • Platform Referral RewardsScale AI · OAScale AI interview questions
  • Maximum Coin Tower HeightExpedia · OAExpedia interview questions
  • Shipping Starts and Terminal DestinationsIntuit · OAIntuit interview questions
  • Weighted Jobs from an Encoded Test CaseJP Morgan Chase · OAJP Morgan Chase interview questions

Bloomberg LP interview experiences

  • Bloomberg AI-Assisted Coding Round, All Levels: 14 Experiences
  • Bloomberg SWE Intern Interview Questions: 68 Questions
  • Bloomberg Interview Questions, Level Not Reported: 65 Questions
  • Bloomberg Experienced Design & More: 126 Questions (Part 2 of 2)
  • Bloomberg Experienced SWE Interviews: 167 Questions (Part 1 of 2)
  • Bloomberg New Grad Coding Questions: 121 Questions (Part 2 of 2)
All Bloomberg LP interview questionsSee Bloomberg LP hiring insights
Saved
class Solution {
    public int longestChain(String[] words) {
      // write your code here
    }

}
Checking account…