Pergunta de entrevista da empresa Newfold Digital

Given an array of integers, write a function that finds the indices of two elements in the array such that their sum is equal to a given target number. If such a pair exists, return the indices as an array. If there are multiple pairs, return the first pair. If no such pair exists, return null.