Switch the array places in a loop

Hi gurki,

I like your attitude. You ask for a hint, not a solution.

With for loops you can loop through c[] and with each step either pick value from a[] or b[]. Second choice is a bit similar what you have started with. Loop through length a[]. With each value of i you first add a value from a[] to c[] and then a value from b[] to c[]. Trick is in how you construct index for c[].

If this was too cryptic, ask and I’ll help you a bit more.

2 Likes