← Akuna Capital Interview Insights

Akuna Capital·Software Engineer·Technical Phone Screen·Intermediate

IntermediatePrefer not to say
Jun 2026

Summary

Akuna Capital system design screen for a software engineering role. The question was pretty focused, more like a mini design exercise than a full-scale distributed systems thing, but there were enough layers to trip you up if you weren't careful.

Questions Asked (1)

Q1

Design a lightweight in-memory communication manager between users. Implement connect, disconnect, and clear functions, define your data structures and method signatures, discuss time/space complexity, edge cases, concurrency, and include a testing plan.

System DesignAlgorithms & Data StructuresTechnical Trade-offs
Author's notes

I went straight to a hash map of adjacency sets and felt pretty good about it.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and defining the core data structures (e.g., a map from user ID to a set of connections). Then implement connect, disconnect, and clear with attention to bidirectional updates and edge cases. Finally, analyze complexity, discuss concurrency strategies, and outline a testing plan.

Pro tip: Emphasize thread-safety early and propose a locking strategy (e.g., fine-grained locks per user) to show you understand production concerns. Also, mention that clear should be efficient and consider memory management.

1. Clarify Requirements and Assumptions

Ask about expected scale, whether connections are bidirectional, if user IDs are unique, and if operations need to be thread-safe. State any assumptions you make.

2. Define Data Structures and Method Signatures

Propose a map (e.g., HashMap<UserId, Set<UserId>>) to store connections. Define methods: connect(user1, user2), disconnect(user1, user2), clear(user) or clearAll().

3. Implement Core Operations and Handle Edge Cases

Describe how each method updates the data structure, ensuring bidirectional consistency. Discuss edge cases like self-connections, duplicate connections, non-existent users, and disconnecting non-connected users.

4. Analyze Complexity and Concurrency

State time and space complexity for each operation (e.g., O(1) average for connect/disconnect with hash sets). Discuss concurrency: use locks (e.g., synchronized, ReentrantLock) or concurrent data structures, and consider deadlock avoidance.

5. Outline Testing Plan

Propose unit tests for normal cases, edge cases, and concurrency (e.g., stress tests with multiple threads). Include tests for clear and memory leak checks.

Key Points to Mention

  • Use of appropriate data structures (e.g., HashMap and HashSet) for O(1) average time complexity.
  • Bidirectional updates: connect and disconnect must update both users' connection sets.
  • Edge cases: self-connection, duplicate connections, disconnecting non-connected users, clearing non-existent users.
  • Concurrency: thread-safety via locks or concurrent collections, and potential deadlocks with multiple locks.
  • Testing: unit tests for functionality, edge cases, and concurrency; use of mocking or stress tests.
  • Space complexity: O(E) where E is number of connections, and potential memory overhead of sets.

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