Python Create Subarray From Array To Hashmap In Cpp