Pergunta de entrevista da empresa Lowe's Home Improvement

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

Resposta da entrevista

Sigiloso

28 de fev. de 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