they are normally faster with a dynamic number of objects if you don't want to waste memory with overallicating its size as resizing an array can be a quite cpu time intense thing (create a the array of the new size, copying the old content, deallocating the old array).
And yep, your examples are quite good for some "standard uses" of this 2 "structures"
And yep, your examples are quite good for some "standard uses" of this 2 "structures"