Java Arraylist And Hashmap Complexity Science