Quick Overview

Given arrays a and b of equal length and an integer k, perform at most k swaps. Work through the function contract, boundary cases, correctness argument, and time and space complexity expected in a production-quality solution.

Maximize Distinct Values with Cross-Array Swaps

Company: Akuna Capital

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: hard

Interview Round: Technical Screen

Overview: Given arrays a and b of equal length and an integer k, perform at most k swaps. Work through the function contract, boundary cases, correctness argument, and time and space complexity expected in a production-quality solution.

Loading…