← Akuna Capital Interview Insights

Akuna Capital·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Apr 2026

Summary

Got a coding question from Akuna Capital for a software engineering role that was basically a class design problem. Pretty straightforward OOP stuff but the edge cases in the spec required some careful reading.

Questions Asked (1)

Q1

Design and implement a CommsHandler abstract base class and a CommunicationException class. CommsHandler should support connecting two callers, hanging up, and clearing all connections, with specific exception handling for cases like self-connection, busy lines, and invalid hangup attempts.

System DesignAPI & IntegrationsTechnical Trade-offs
Author's notes

The spec looks simple but there are a lot of little branches to get right.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and defining the interface for CommsHandler and CommunicationException, then walk through the design of the abstract class and exception hierarchy, and finally discuss implementation details and edge cases. Emphasize clean separation of concerns, extensibility, and robust error handling.

Pro tip: Demonstrate awareness of thread safety and resource management, as these are critical in real-time communication systems like those at Akuna Capital. Mention how you would test the exception scenarios to ensure reliability.

1. Clarify Requirements and Scope

Ask clarifying questions about expected behavior, such as whether connections are bidirectional, if multiple connections per caller are allowed, and what constitutes a 'busy' line. Confirm the need for thread safety and any performance constraints.

2. Define the Exception Hierarchy

Design CommunicationException as a base class (likely extending std::exception or similar) with derived classes for specific errors like SelfConnectionException, BusyLineException, and InvalidHangupException. Ensure exceptions carry meaningful context.

3. Design the CommsHandler Interface

Define pure virtual methods: connect(caller1, caller2), hangup(caller), and clearAll(). Specify preconditions and postconditions, and document which exceptions each method may throw.

4. Outline Implementation Strategy

Describe how you would implement the concrete class: maintain a mapping of active connections (e.g., a set of pairs or adjacency list), check for self-connection, busy lines, and invalid hangup attempts before modifying state. Use appropriate synchronization if needed.

5. Discuss Edge Cases and Testing

Enumerate edge cases: connecting a caller to themselves, connecting when either caller is already in a call, hanging up a caller not in a call, clearing when no connections exist. Explain how you would test these scenarios, including unit tests for each exception.

Key Points to Mention

  • Use of abstract base class to define interface and enforce contract
  • Exception hierarchy with specific exception types for different error conditions
  • Data structures for efficient connection management (e.g., hash map of caller to connection)
  • Thread safety considerations (mutexes, locks) if concurrent access is possible
  • Resource cleanup and ensuring no dangling connections after hangup or clear
  • Testing strategy including unit tests for normal and exceptional paths

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.