User talk:CalmoSoft: Difference between revisions

Line 269:
 
: I would add another set of elements that had the same (max) difference, and have the program select the first maximum difference that it finds.   Also, specify that the two elements (which have the maximum difference) be identified   (as you have above, but with more verbiage).   And have at least one of the elements have a negative value,   and also an element that has a zero value.   You didn't mention it,   but are you going to restrict the numbers to integers or any real number?   An example that would "stress test" these requirements could be an element list such as:     '''2, 0, 1, 1, -2, 0, 5, 8, 6, 2, 9, 11, 8, 1'''     I am not sure that all lists   (for different computer programming languages)   prohibit the use of duplicates,   but for this task,   allow duplicate numbers.     -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 09:56, 18 July 2021 (UTC)
 
: I would say make the list a mixture of integers and floating point numbers, and find minimum, maximum, and average distance (one task not three), and the/all positions of the max/min pairs. When checking to see if anything like this already existed I noticed [[Greatest_element_of_a_list]] as a related task. --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 11:32, 18 July 2021 (UTC)
7,794

edits