Arrays in C++ | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Arrays in C++

Which one's faster: Iterating through two char arrays containing four elements each, or iterating through one char array containing eight elements. My question is in the context of C++.

17th Feb 2018, 4:53 PM
Abdullah Omar Nasseef
Abdullah Omar Nasseef - avatar
1 Answer
+ 2
Both are O(n) time complexty, it dose not really matter...
17th Feb 2018, 6:29 PM
Nitzan
Nitzan - avatar