1p3a Question · Sep 2025

Databricks Tech Phone Screen: Anagram Index Coding Challenge

SWE Phone Screen
1 upvote 8 replies

Question Details

The entire phone interview lasted 60 minutes. There was a 15-minute chat before and after the coding challenge, leaving 45 minutes for coding. One problem was very concise, described in a single line:

Full Details

The entire phone interview lasted 60 minutes. There was a 15-minute chat before and after the coding challenge, leaving 45 minutes for coding. One problem was very concise, described in a single line: Given a string, for example, "databricks", and a query, for example, "tad", find the index of the first occurrence of the query's anagram in the string. For example, if the string is "databricks", then regardless of the given query, whether it's "tad", "atd", or "dat", the index should be 0, because "dat" is the anagram of these queries. def anagram_index(lookup_string, query) -> int anagram_index('databricks', 'atd') should return 0. If the query is changed to 'sk', it should return 8.

About This Question

This is a reported interview question from a databricks interview for a swe role during the phone screen round reported in 2025.

It covers the following topics: Strings .

Topics