Unit 2 Question 21

As far as I can tell the given solutions return the response "None" when two or more of the inputs are equivalent, which is correct in the technical sense that there exists no "biggest". But the procedure "max" responds with the largest number argued, whether there is one or more instances of it. So, isn't it correct that they are not equivalent?

asked 01 Mar '12, 17:33

dkbradley's gravatar image

dkbradley
313
accept rate: 0%

retagged 01 Mar '12, 18:23

pmoriarty's gravatar image

pmoriarty
5.5k52377


2 Answers:

If both are the same, who minds which one is shown?

You can say if a>b output a ... and if not (because are the same) output b, for example

link

answered 01 Mar '12, 18:03

Emilio%20Gonzalez-1's gravatar image

Emilio Gonza...
2.0k72044

I wrote an algorithm that prints out the biggest number also if it is repeated...because anyway it is the biggest in your series...

link

answered 01 Mar '12, 18:09

Lele's gravatar image

Lele
2.7k31534

Your answer
Question text:

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×15,235
×18
×7

Asked: 01 Mar '12, 17:33

Seen: 143 times

Last updated: 01 Mar '12, 18:23