Senior Software Engineer Python Interview Questions | Glassdoor

Senior Software Engineer Python Interview Questions

2

Senior software engineer python interview questions shared by candidates

Top Interview Questions

Sort: Relevance Popular Date

Write a Unix glob implementation in python. Globbing lets you use * for zero or more characters, ? for a single character, [] for a character range.

1 Answer

The key to this problem is recursion and avoiding quadratic complexities, so you need to convert your text into words and then compose those words into a trie (not tree) of indexed characters. You then traverse that trie, recursing as necessary, to produce a list of matching words and their indices into the original text. Note: I made the whole search corpus into a trie, and I shouldn't have for maximum points. I should have only trie-d the first three or four characters and used linear matching for the rest of the words into order to save on memory.

I was questioned around various sorting algorithm and picked on some of Python's internal specificities. Notably on what makes Python's Tim sort so effective and the global interpreter lock.

12 of 2 Interview Questions