Akuna Capital Interview Questions
Master your tech interview with our curated database of real questions from top companies.
Count inversions in an array efficiently
Given the array [5, 7, 9, 2, 3, 12, 8, 4], compute the number of inversion pairs (i, j) where i < j and arr[i] > arr[j]. Describe both a naive O(n^ 2)...
Compute min operations to transform integers
Given integers A and B, transform A into B using the minimum number of operations. Allowed operations: ( 1) subtract 1 from the current value; ( 2) mu...
Design communication handler and exceptions
Implement a Communication Handler with Exceptions Context You are building a single-line communication handler that can connect exactly two Caller ins...
Compute max profit across dated stock quotes
You are given an unsorted list of price records for multiple stocks, each record as (date, symbol, price). Dates may be repeated across different symb...
Break a palindrome to smallest non-palindrome
Given a palindromic string s of lowercase English letters, change exactly one character to obtain a new string that is not a palindrome and is lexicog...
Implement a two-user communications handler
One-at-a-time Two-User Communications Handler Context Design and implement a communications handler that supports exactly one active conversation at a...
Identify false MySQL foreign key statement
MySQL: Which of the following statements is false? A) A column might have a foreign key reference to itself. B) MySQL supports foreign key references ...
Design an order-matching engine
In-Memory Limit Order-Matching Engine (Limit Order Book) Context You are asked to design and implement an in-memory, single-instrument limit order boo...
Implement a ring buffer
Implement a fixed-capacity circular buffer (ring buffer) supporting push, pop, peek, isEmpty, isFull, and size in O( 1) time using an array. Define an...
Heapify an array into a max-heap
Given the array [6, 15, 2, 4, 3, 8, 19], apply heapify to build a max-heap using the standard in-place bottom-up method with a 0-indexed array represe...
Evaluate SQL expressions for zero
Which of the following SQL expressions evaluate to 0? Evaluate each independently, justify the result, and note any dialect-specific behavior (e.g., M...
Design two-user communications handler with exceptions
Implement a two-user communications handler. Create: (A) CommsHandler(CommsHandlerABC) with methods connect(self, user1: Caller, user2: Caller) -> str...
Implement React check-in/out month dropdowns
React UI Enhancement: Check-in/Check-out Month Dropdowns Context You are working on a hotel reservation form in a React codebase. The form needs two n...
Solve sliding window, graph top-k, and greedy tasks
You have three coding tasks. Task 1 — Sliding window on strings: Given a string s and an integer k, find one longest substring of s that contains at m...
Fix and harden an object pool
Refactor a Buggy C++ Object Pool Into a Correct, Thread-Safe Template Context You are given a buggy C++ object pool that suffers from races, double-fr...
Maximize profitable pairs
You are given an array profits of n integers representing net profit per item and an integer threshold T. You may form disjoint pairs (i, j). What is ...
Compute delivery order via BFS
A city road network is an unweighted, undirected graph G(V, E) with a depot node s and D delivery requests located at nodes r1..rD, each with an integ...
Count subarrays equal to target
Given an integer array nums and an integer k, count the number of contiguous subarrays whose sum equals k. Solve it in O(n) time and O(n) space by mai...
Solve three C++ algorithmic tasks
Solve the following three C++ algorithmic tasks. For each, implement an efficient function and state time and space complexity. a) Diminishing prices ...
Solve swaps, graph paths, and movie DP
Design and implement solutions for three tasks derived from a HackerRank-style assessment. 1) Minimum swaps to reverse sort an array: - Input: an inte...