When the element is matched then the right side element shift to left but this shifting is coppy.the actual work is to decrease the size of array if size of array 5 then decrease the 1 become 4 but you carry the loop size-1. But actual size of array remain same
NYC bro
what about last element of any array
When the element is matched then the right side element shift to left but this shifting is coppy.the actual work is to decrease the size of array if size of array 5 then decrease the 1 become 4 but you carry the loop size-1. But actual size of array remain same
array size cannot be decreased ,arraylist can increase or decrease size
Not a correct