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

Loading…