Back to course home
0% completed
Vote For New Content
Algorithms to use with the "Array" and "Matrix" data structures
matthew.carnahan1
Jul 5, 2024
The week 1 material introduces the data structures "Arrays" and "Matrices". I don't recall any specific algorithms were covered though. It seems like when running code that exploits an array or matrix, the main takeaways are:
- Write the code in a way that minimizes the amount of times it has to loop over the array/matrix.
- Write the code in a way that minimizes (and ideally eliminates) duplicate operations. For example, when building an array with cumulative sums, calculate each value as the previous index's cumulative sum, plus the next value.
Does everyone concur with this? Are there any other takeaways for writing code that uses arrays/matrices? Were there specific algorithms that I missed?
2
0
Comments
Comments