How can I determine the input size of an algorithm?
for the first code segment, input size is 2n. a has n elements, so does b.
for the second code segment, input size is 2n. a has n elements, so does b.
for the third segment, input size is n+1. a has n elements, and there is another value n.
for the fourth code segment, input size is 2.