cswork / libraryOpen practice workspace

Interview experiences · Atlassian

Atlassian Senior Software Engineer Interview Experience — Shortest Unique Substrings for UI Shortcuts

Tech screenInterviewed 2026-08

In a Web UI dropdown, users needed help quickly memorizing keyboard shortcuts. For every string in an input list, find its shortest unique substring and wrap that substring with the tags <u> and </u>. Implement a function that performs this transformation. The detailed requirements were: Uniqueness: The chosen substring must not appear anywhere as a substring of any other string in the input list…

In a Web UI dropdown, users needed help quickly memorizing keyboard shortcuts. For every string in an input list, find its shortest unique substring and wrap that substring with the tags <u> and </u>. Implement a function that performs this transformation.

The detailed requirements were:

  1. Uniqueness: The chosen substring must not appear anywhere as a substring of any other string in the input list.

  2. Shortest length: Among all unique substrings, choose one with the smallest length.

  3. Conflict handling: If several shortest unique substrings have the same length, choose the one that appears earliest in the original string.

  4. Case-insensitive matching: Ignore case when matching substrings and checking uniqueness.

  5. Preserve the original: In the returned list, every character must retain its original capitalization, and the order of the list must remain the same as the input.

Example:

Input:  ["Bird", "Cat", "Cow", "Dog", "Wallaby"]
Output: ["B<u>i</u>rd", "Ca<u>t</u>", "<u>Co</u>w", "Do<u>g</u>", "Wa<u>l</u>laby"]

Comments

Nothing here yet.

Join in on CSWork →