Interview Question: logs parsing library

One of the question I often ask in my interview is to design a log processing library: You need to write a library for processing logs in the following format: timestamp<TAB>message The library will be handed over to a different team for further maintenance and improvements and so maintainability and expandability is the most most important requirements. The library need to support the following operations out of the box: filtering counting histograms The original version also included some language and background specific expectations I never include in my assessment because I feel that they put the candidate into a position when they need to read my mind to meet those expectations. ...

September 29, 2024 · 5 min · Anton Golubtsov

An Interview Question: Optimization of Disk Read costs

One of the questions are really love asking during coding interviews is this: Given a continuous stream of words, a dictionary on disk and cost associated to read from disk, create a stream processor that returns true when a word exists in the dictionary while minimizing the cost of reading from disk. Example: Dictionary: {Dog, Cat, Bird, Lion, ...} Input: [Dog, Cat, Aghd, ...] Output: [True, True, False, ...] The output is true, true, false because dog and cat exist in the dictionary of words while Aghd is not considered a word. ...

September 24, 2024 · 3 min · Anton Golubtsov

One Interesting Code Challenge from Leetcode: finding anagrams in a string

In my coding interviews I often use a simplified version of this challenge from Leetcode. The simplified version I use: Given two strings s and p, return true if s contains an anagram for p. I like this task because the solution and be improved little by little and there are a lot things to discuss. From algorithmic complexity to CPU cache level optimization. Here I want to walk you through how I solved that challenge for the first time. ...

May 29, 2022 · 9 min · Anton Golubtsov