{"action":"opened","issue":{"url":"https://api.github.com/repos/hollance/swift-algorithm-club/issues/75","repository_url":"https://api.github.com/repos/hollance/swift-algorithm-club","labels_url":"https://api.github.com/repos/hollance/swift-algorithm-club/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/hollance/swift-algorithm-club/issues/75/comments","events_url":"https://api.github.com/repos/hollance/swift-algorithm-club/issues/75/events","html_url":"https://github.com/hollance/swift-algorithm-club/issues/75","id":140427313,"number":75,"title":"Select Minimum Maximum questions","user":{"login":"makthrow","id":753532,"avatar_url":"https://avatars.githubusercontent.com/u/753532?v=3","gravatar_id":"","url":"https://api.github.com/users/makthrow","html_url":"https://github.com/makthrow","followers_url":"https://api.github.com/users/makthrow/followers","following_url":"https://api.github.com/users/makthrow/following{/other_user}","gists_url":"https://api.github.com/users/makthrow/gists{/gist_id}","starred_url":"https://api.github.com/users/makthrow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/makthrow/subscriptions","organizations_url":"https://api.github.com/users/makthrow/orgs","repos_url":"https://api.github.com/users/makthrow/repos","events_url":"https://api.github.com/users/makthrow/events{/privacy}","received_events_url":"https://api.github.com/users/makthrow/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-12T23:29:45Z","updated_at":"2016-03-12T23:29:45Z","closed_at":null,"body":"There are two implementations of min/max, both of which are O(n).\r\nIs there any reason to choose the second algorithm (comparing in pairs) over the first?\r\n\r\nAnd, for swift's minElement() and maxElement(),\r\n```\r\nlet array = [ 8, 3, 9, 4, 6 ]\r\narray.minElement()   // This will return 3\r\narray.maxElement()   // This will return 9\r\n\r\n```\r\nDid they use the first algorithm (one-by-one comparison) or the second (pair comparison)?\r\n"}}