Role: Python Developer Intern
College: Not Specified
Interview Date: February 11, 2022
Interview Type: On-Campus
Result: Selected (received offer for 'Automation Engineer Intern')
Difficulty: Not Specified
Rounds: 1 Coding Round, 3 Technical/CodePair Rounds
Topics Asked: Python Logic, Multi-threading, Operating Systems, Data Structures, Algorithms (greedy, stack-based, graph/dictionary, binary search), System Design, Binary Search Trees
Experience:
The candidate, Sahma, interviewed for a Python Developer Intern role at AlphaGrep, an HFT firm, and received an offer for 'Automation Engineer Intern'. The interview process was primarily based on Python, multi-threading, and general OS questions.
Coding Round (HackerRank): This round had 4 questions to be solved in Python within 90 minutes.
- A string manipulation problem: return a new string by altering only one letter such that the resultant string is lexicographically smallest and not a palindrome.
- A scheduling problem: given start and end times for events, return the maximum number of possible events without conflict. The candidate used a greedy approach by sorting events by end time.
- A graph question that simplified to using a dictionary: given friends with values and interests shared via weighted edges, output the maximum product of two nodes connected by maximum single edges (edge weights were irrelevant).
- A balanced parentheses check for a string expression consisting of '{}()[]' using a stack-based approach. The interviewer followed up with a question about ignoring other characters.
Technical/CodePair Rounds (3 rounds): These rounds involved Python logic, multi-threading, and general OS concepts.
- A question on finding the nearest city in a 2D grid that shares either the x or y coordinate with a given city. If multiple cities satisfy the criteria, output the alphabetically smallest. The candidate initially used brute force, then optimized with two dictionaries for x and y coordinates and binary search.
- A problem involving reading a very long document and returning a list of words arranged by their frequency of occurrences. The candidate initially proposed reading into a string, but the interviewer pointed out potential overflow for large files. An online processing scheme (reading and processing character by character) was then proposed.
- A multi-threading example similar to the Producer-Consumer Problem, involving a global buffer accessed via a lock for mutual exclusion, with a Downloader thread and a Computing Thread.
- A question on "Recover Binary Search Tree".
Key Takeaways: For HFT firms, have a good understanding of OS and computer architecture fundamentals. Practice LeetCode questions. Start with brute force and optimize. Use company archives on GFG or Medium for preparation.