hudson | Software Engineer | Interview Experience
Interview Date: Not specified
Result: Not specified
Difficulty: Not specified
Interview Process
The interview lasted 70 minutes and consisted of four questions that were relatively simple.
Technical Questions
-
Strings
You are developing an automatic moderation system for a chat application that detects certain linguistic patterns. Given a stringchatMessagecontaining a sequence of characters, your task is to count the number of substrings of exactly length 3 where at least one character is a vowel (“a”, “e”, “i”, “o”, “u”, or their uppercase counterparts). Return this number as an integer.- Example: For
chatMessage = "codeSignal", the output should besolution(chatMessage) = 8. - Explanation: The substrings of length 3 are: “cod”, “ode”, “des”, “esi”, “sig”, “ign”, “gna”, “nal”. All these substrings contain at least one vowel. Thus, the answer is 8.
- Example: For
-
Arrays
You are helping a bird build its nest. You are given an arrayforest, containing positive integers and zeros, and a non-negative integerbird, representing the bird’s initial position. Each positive integer within the forest is considered to be a stick, where the value represents the length of the stick. Each zero withinforestrepresents that this place is empty.- The bird builds its nest by flying to the right until it finds a stick, then returning to its initial position and attaching the found stick to the nest. It then flies in the opposite direction and repeats the process until the total length of the sticks in the nest reaches 100.
- Example: For
forest = [25, 0, 50, 0, 0, 0, 0, 15, 0, 0, 45]andbird = 4, the output should besolution(forest, bird) = [7, 2, 10].
Tips & Insights
Focus on understanding the problem requirements and constraints clearly before jumping into coding.