Domanda di colloquio di Lowe's Home Improvement

Given 2 Sorted Arrays, Combine them into a single Sorted Array

Risposta di colloquio

Anonimo

28 feb 2025

Initialize pointer for both array at index 0 and compare the elements from both array at the index,after compare the elements push the smallest one in the new array and increament the pointer of that array by one...do this until any of them don't exceed the size of array ...and then put the rest element in the new array