LinkedIn Full Loop Staff Software Engineer Applications (Reject)
Qualifier Coding Round
All O(1) design
Design a data structure that retrieves and updates and deletes data based on keys, and retrieves the keys with the maximum and minimum frequency in O(1) time.
1. Coding Round 1
•Problem: Rat in a Maze (variant)
•The task required defining classes and methods and implementing them using pure OOP principles.
•Focus areas:
•Readability
•Maintainability
•Testability
•Time Complexity
•Went well, but I missed one edge case. Implemented that one as well
2. Design Round
•Problem: Design a system to fetch the top articles shared by users in the last 15 minutes, 60 minutes, and 24 hours.
•I performed well initially, but the interviewer adjusted the problem to include more fine-grained time intervals, such as 1 minute, 2 minutes, and 3 minutes.
•He want the solution to be more flexible in terms of time windows he can change windows at any time.
Elaboration
Apache Flink is a powerful stream processing framework that allows you to process events in real time, with capabilities like windowing (which helps in grouping events over a specific time interval) and aggregation (such as counting events). When you process data in windows such as 15 minutes, 60 minutes, or even 24 hours, you typically want to group events based on a key (e.g., URL) and compute an aggregation (like a count of events) within each window.
Using a simple priority queue might seem like an intuitive approach for managing event order, but it's not suitable for real-time, fault-tolerant stream processing. Here are the key reasons:
•Fault Tolerance: A priority queue on its own doesn't have any built-in mechanism for recovering state in case of a failure. In a distributed streaming system like Flink, nodes may fail or be restarted, and without a fault-tolerant mechanism like state checkpointing, the system would lose its progress, leading to incorrect results or data loss.
•Handling Out-of-Order Events: In real-world streaming systems, events often arrive out of order due to network delays or other factors. A simple priority queue might only process events in the order they arrive, which means it wouldn't handle out-of-order events appropriately. Flink, however, provides sophisticated mechanisms for managing event time, like watermarks, to handle out-of-order data and ensure that windows are processed correctly.
•Single Point of Failure: In a distributed setup with Flink, nodes are typically part of a cluster, where each node handles a part of the data. If a single node fails and there’s no fault tolerance mechanism, that node would lose its data or computations, resulting in a single point of failure. Flink addresses this with built-in features like distributed snapshots (checkpoints) and state backends that ensure the system can recover in case of node failure.
•In conclusion, for building a scalable, fault-tolerant stream processing pipeline that handles time windows (e.g., 15-minute, 60-minute, 24-hour windows), Flink offers better abstractions (such as time windows, watermarks, and stateful processing) that go beyond what a simple priority queue can offer. These features help maintain consistency, handle out-of-order events, and provide fault tolerance in the event of failures.
Did well in this round as well, but the feedback was dynamic window solution was not that accurate.
3. Craftsmanship Round
•The discussion revolved around project metrics, CI/CD processes, Reactive Systems, and other technical topics.
•I did well in this round.
4. Leadership Round
•The focus was on leadership and in-depth discussions of the projects I’ve led.
•I performed well in this round as well.
5. Coding Round 2
1.Problem 1: Check if a number is a power of 2.
2.Problem 2: Find the node that is the least number of edges away from any other node in a binary tree.
•For the second problem, I initially implemented a DFS-based solution to find nodes at a k-distance in a binary tree. However, the interviewer preferred BFS and was not fully convinced with the DFS approach.
•I fumbled a bit while explaining the DFS solution, as the interviewer seemed to expect a more perfect and optimized approach
Final Verdict: Rejected
While I did well in several rounds, I struggled in the coding rounds, especially with the DFS vs BFS approach. As mentioned in previous posts, they seem to expect a flawless solution.