Problem 15 Maximum of Array Output

Back to Problem Solutions forum

fasciation     2019-11-12 23:36:19

I am not sure what the output is supposed to be. Since the problem said to find the extremal value (maximum/minimum) of the array.

Does that mean the maximum is the largest number in the array, and the minimum is the smallest number in the array? Am I understanding the extremal value wrong?
Because the expected answer did not match up with mine.

Quandray     2019-11-13 07:41:51
User avatar

Test your code with this input. It clearly doesn't give the correct answer
-999999 -39891 59805 62229 -50713 32086 -68528 -30879 -71743 -74922 -60433 -27348 63869 12027 -20714 -1534 20081 -69367 67764 -5379 -20652 -962 -73459 42918 57815 -4610 -42859 9518 -64512 38487 -73157 52307 78595 66647 34536 -52117 18733 46007 -2997 26990 51085 16569 79641 34955 -51403 -21073 -46579 48677 -10440 -58815 -36701 48907 20223 -30161 11826 -1961 45229 48966 -72443 60716 7453 -65600 33023 6049 -78953 -12440 33932 19780 -46432 -49065 -33230 -75347 47504 -33588 39608 76101 25339 73028 44778 -65101 -65786 -71923 63805 34437 -22084 -4368 -47524 -56855 -35402 -39967 -76138 52051 -25568 36884 -21899 -24522 -55555 -67967 75258 -21988 -37032 -37972 -17335 -69528 8440 -57727 -73427 -46221 -64699 51351 -31323 -50486 59428 -47517 63950 -42656 28114 -63573 -19511 72712 -23541 -15650 44764 30890 -58765 -57135 -73631 -34321 -45102 -78373 23690 -2135 -36345 -73645 8337 52094 -51372 14909 -74127 -36072 -13739 -25451 -6558 -34311 7032 -22607 3033 -44854 -6181 63521 -52141 50277 -32129 72622 1168 -10895 -64512 7536 34784 -29615 9162 -21526 48250 52816 -15171 -23413 24911 13456 71495 30783 57384 -22244 -74667 -29173 23445 12364 28219 -53522 47510 -57961 -70001 75368 72316 -22130 67990 -6516 46975 -76521 -78980 1759 -26136 10182 60233 -57886 -17002 -34938 -1300 -72091 58518 -9804 38692 35902 47952 44024 -73271 -8603 -23611 34948 17875 -56101 56986 27873 -60733 49302 -74256 -72742 -37213 52719 -69264 -36194 -25521 -15401 53987 -45288 6713 -43014 -226 -74587 -35105 -21708 -4391 -76412 -65805 -36439 47611 -59077 34958 -55999 55871 -27167 -32101 32858 -79293 -12834 2160 -73550 -5577 44947 59169 5159 -71247 -46352 69758 62740 -11641 -3528 -60274 68132 1884 -15379 -33575 77493 -11792 -19381 -38946 -44180 1542 76011 -20180 -22587 -31156 27719 -69729 -30449 -65115 12431 -23999 9308 -22622 -44830 -65532 -13869 -11183 -75773 -31129 57175 698 -11403 45308 -77417 53217 -68267 -79924 -38574 -7649 -38870 -2754 73892 -1 123

Please login and solve 5 problems to be able to post at forum