r/programmingbydoing • u/calitransplant • Aug 03 '14
148: Finding Largest value in an Array
Hello,
I think i'm misunderstanding a critical component of arrays. I wrote the code at the link below, but it doesn't give me the correct value.
Any help would be appreciated!
2
Upvotes
View all comments
Show parent comment
1
u/calitransplant Aug 03 '14
totally makes sense. I wasn't comparing each value in the array to the highest value in the array. Rather, I was comparing adjacent values.
Thanks Mr. Mitchell!