An insert into a hash table has a worst case complexity of O(n).
But when creating a new hash table and inserting n elements, as far as I understand this would result in n insertions into a growing hash table. Therefore, O(1) + O(2) + O(3) + ... + O(n) = O((n^2+n)/2). So worst runtime complexity of creating a hash table with n elements would be quadratic. Is this correct?
However, average and amortized runtime complexity of inserts are O(1), therefore average and amortized runtime complexity of creating a hashmap with n elements would also be O(1)?