Js Subarray From Array To Hashmap Interview