Preprocess Word Positions for Repeated Distance Queries
Company: Palantir
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: medium
Interview Round: Other
Overview: Preprocess Word Positions for Repeated Distance Queries. Implement WordDistance(wordsDict) and shortest(word1,word2). Each shortest call returns the least index distance between occurrences of its two different words