Akuna Capital Interview Questions
Showing 19 questions
You are given a string and a set of queries. For each query, determine if a given substring can be rearranged to form a palindrome after replacing up to a certain number of its characters.
#1. Can Make Palindrome from Substring
You're given a list of numbers. By deleting a number, you earn its value, but you must also delete all numbers one less and one greater than it. Maximize the total earned value.
#2. Delete and Earn
Given a string, reorder its characters by repeatedly picking the smallest character, then the largest, and appending them to the result.
#3. Increasing Decreasing String
Imagine two people picking cherries from a grid, starting and ending at opposite corners. Find the maximum number of cherries they can collect together, with some constraints on their movement and the grid's cherry distribution.
#4. Cherry Pickup
Implement a data structure that can store key-value pairs and calculate the sum of values for keys with a given prefix. You'll need to efficiently handle updates and prefix-based sum queries.
#5. Map Sum Pairs
You are given a sequence of numbers and must insert them into an initially empty array. Calculate the cost of inserting each number, defined as the minimum of elements smaller or larger than the number currently in the array, and return the total cost to create the sorted array.
#6. Create Sorted Array through Instructions
You are given a list of tasks, each requiring a certain amount of energy to start and providing some energy upon completion. Find the minimum initial energy you need to have in order to complete all the tasks in the given order.
#7. Minimum Initial Energy to Finish Tasks
You're given an array of numbers. Find the minimum number of distinct integers you need to remove so that the remaining array size is at most half of the original size.
#8. Reduce Array Size to The Half
Given an array of unique positive integers, find the total number of different greatest common divisors possible from all of its non-empty subsequences.
#9. Number of Different Subsequences GCDs
Imagine you're watering a garden using strategically placed taps. Find the fewest taps you need to open to water the entire garden, given each tap's watering range.
#10. Minimum Number of Taps to Open to Water a Garden
You're given a network of computers and cables. Determine the minimum number of cables you need to move to connect all the computers, or if it's impossible.
#11. Number of Operations to Make Network Connected
Find the number of distinct sequences possible when rolling a standard six-sided die multiple times, subject to constraints that limit how many times each face can appear consecutively.
#12. Dice Roll Simulation
You are given a network of nodes and the time it takes to travel between them. Determine the minimum time it takes for a signal to reach all nodes, starting from a given source node.
#13. Network Delay Time
Find the maximum sum of a subsequence in an array, where the distance between consecutive elements in the subsequence is constrained by a given value.
#14. Constrained Subsequence Sum
In a graph where each node has a value, find the maximum sum achievable by selecting a node and up to 'k' of its neighbors. The star sum is the sum of the chosen node's value and its neighbors' values.
#15. Maximum Star Sum of a Graph
You're given the processing times for processors and tasks. Assign each task to a processor to minimize the overall completion time, considering each processor can handle tasks in batches.
#16. Minimum Processing Time
Identify the critical connections in a network of computers, where removing a critical connection will disconnect the network. These are the connections that are essential for maintaining the network's connectivity.
#17. Critical Connections in a Network
Given an undirected graph that contains exactly one cycle, find the shortest distance from each node to any node in that cycle. Nodes that are part of the cycle have a distance of zero.
#18. Distance to a Cycle in Undirected Graph
Given a grid representing land and water, count the number of distinct islands. An island is formed by connected land cells.
#19. Number of Islands