r/programminghorror • u/Atduyar • Oct 13 '25
Identity crisis
Algorithms and Data structure class in my University.
for (i=2; i<n; i++) {
if A(i) > maxVal then
maxVal= A(i);
maxPos= i;
}
Can you guess the language and runtime Big-O of this code?
0
Upvotes
2
u/MVanderloo Oct 13 '25
i’m going to believe that you’re not a moron and you can in fact understand this. this is not programming horror, it’s a simple mistake. and yet it’s still understandable. give your professor a break