Answer Repeated Shortest Word Distance Queries

Read the full interview experience this question came from →

Quick Overview

Preprocess a fixed word array and answer many shortest-distance queries between distinct repeated words. The prompt defines case-sensitive matching, ordered batch outputs, repeated queries, valid-word guarantees, and input sizes that reward indexed occurrence lists and two-pointer scans.

Answer Repeated Shortest Word Distance Queries

Company: LinkedIn

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: easy

Interview Round: Technical Screen

Overview: Preprocess a fixed word array and answer many shortest-distance queries between distinct repeated words. The prompt defines case-sensitive matching, ordered batch outputs, repeated queries, valid-word guarantees, and input sizes that reward indexed occurrence lists and two-pointer scans.

Read the full LinkedIn Software Engineer interview experience this question came from

|Home/Coding & Algorithms/LinkedIn
LinkedIn logo
LinkedIn
Aug 19, 2026
easySoftware EngineerTechnical ScreenCoding & Algorithms
5
0
Loading...

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...