I am trying to see if there's a more efficient algoritm to find the smallest and biggest number in an array.
I have an array that has a size of 101.
Right now i am doing a loop and comparing each values to locate the smallest and largest but the code looks heavy to me and not very efficient.
what would be a good way to do that?
Thanks.
P
I have an array that has a size of 101.
Right now i am doing a loop and comparing each values to locate the smallest and largest but the code looks heavy to me and not very efficient.
what would be a good way to do that?
Thanks.
P