✅ How can I check if an array need to be resize when adding an element
Hello guys, can someone suggest an idea of how to check whether the array is full and need to be resize when adding an element please. Since the array is a generic type and can have any data type, I can't check if the last index of the array contains a specific default value of a data type, like I can't assume it's an int and so have a default value of 0. Moreover, I don't think it would be right to assume 0 is a default value since our array can have a value of 0 as its element.