We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
The two innermost loops always result in nine additions, regardless of the size of the multidimensional array. There is absolutely no difference in "time complexity" when doing something like the following instead of the nested loops:
Day 11: 2D Arrays
You are viewing a single comment's thread. Return to all comments →
The two innermost loops always result in nine additions, regardless of the size of the multidimensional array. There is absolutely no difference in "time complexity" when doing something like the following instead of the nested loops:
The source code provided by boleke, when modified to accept arrays of various sizes, runs in O(n).