Algorithm · Amazon · Hard
You are provided with two integer arrays, a and b, each already arranged in non‑decreasing order. Along with these arrays, you are given an integer k. Your task is to determine the k-th smallest value (using 1‑based indexing) that would appear if you combined both arrays into a single sorted sequence. Do not construct the combined array explicitly. Instead, design a solution that locates the element via a direct search. The arrays may have unequal sizes; either one could be…