{"action":"created","comment":{"url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/pulls/comments/74131427","id":74131427,"diff_hunk":"@@ -17,5 +15,5 @@ XCTAssertEqual(90, largestNumberComposed(from: [9,0]))\n \n XCTAssertEqual(910, largestNumberComposed(from: [10,9]))\n \n-XCTAssertEqual(95021, largestNumberComposed(from: [50,2,1,9]))\n+XCTAssertEqual(56554, largestNumberComposed(from: [54,5,56]))","path":"largest-number-from-array.playground/Contents.swift","position":null,"original_position":16,"commit_id":"7ce5cc2e8ffa53d60edbb65b8c7173f27e69c338","original_commit_id":"7ce5cc2e8ffa53d60edbb65b8c7173f27e69c338","user":{"login":"fsferrara","id":4817767,"avatar_url":"https://avatars.githubusercontent.com/u/4817767?v=3","gravatar_id":"","url":"https://api.github.com/users/fsferrara","html_url":"https://github.com/fsferrara","followers_url":"https://api.github.com/users/fsferrara/followers","following_url":"https://api.github.com/users/fsferrara/following{/other_user}","gists_url":"https://api.github.com/users/fsferrara/gists{/gist_id}","starred_url":"https://api.github.com/users/fsferrara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsferrara/subscriptions","organizations_url":"https://api.github.com/users/fsferrara/orgs","repos_url":"https://api.github.com/users/fsferrara/repos","events_url":"https://api.github.com/users/fsferrara/events{/privacy}","received_events_url":"https://api.github.com/users/fsferrara/received_events","type":"User","site_admin":false},"body":"As you have pointed out, a lexicographic sort and concatenation is close, but not quite correct. For example, for the numbers 5, 54, and 56 a lexicographic sort will produce {5, 54, 56} (in increasing order) or {56, 54, 5} (in decreasing order), but what we really want is {56, 5, 54}, since that produces the largest number possible.","created_at":"2016-08-09T19:49:13Z","updated_at":"2016-08-09T19:49:13Z","html_url":"https://github.com/HcomCoolCode/unusually-large-number/pull/1#discussion_r74131427","pull_request_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/pulls/comments/74131427"},"html":{"href":"https://github.com/HcomCoolCode/unusually-large-number/pull/1#discussion_r74131427"},"pull_request":{"href":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/pulls/1","id":80065048,"html_url":"https://github.com/HcomCoolCode/unusually-large-number/pull/1","diff_url":"https://github.com/HcomCoolCode/unusually-large-number/pull/1.diff","patch_url":"https://github.com/HcomCoolCode/unusually-large-number/pull/1.patch","issue_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/issues/1","number":1,"state":"open","locked":false,"title":"one-line solution","user":{"login":"fsferrara","id":4817767,"avatar_url":"https://avatars.githubusercontent.com/u/4817767?v=3","gravatar_id":"","url":"https://api.github.com/users/fsferrara","html_url":"https://github.com/fsferrara","followers_url":"https://api.github.com/users/fsferrara/followers","following_url":"https://api.github.com/users/fsferrara/following{/other_user}","gists_url":"https://api.github.com/users/fsferrara/gists{/gist_id}","starred_url":"https://api.github.com/users/fsferrara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsferrara/subscriptions","organizations_url":"https://api.github.com/users/fsferrara/orgs","repos_url":"https://api.github.com/users/fsferrara/repos","events_url":"https://api.github.com/users/fsferrara/events{/privacy}","received_events_url":"https://api.github.com/users/fsferrara/received_events","type":"User","site_admin":false},"body":"thanks to Marco Sciamanna... my first solution was actually a bubble-sort 👎 ","created_at":"2016-08-04T11:52:21Z","updated_at":"2016-08-09T19:49:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"06eebe7b10997bb2f0e3959eb8f77b38a75af000","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/pulls/1/commits","review_comments_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/pulls/1/comments","review_comment_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/issues/1/comments","statuses_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/statuses/7ce5cc2e8ffa53d60edbb65b8c7173f27e69c338","head":{"label":"fsferrara:master","ref":"master","sha":"7ce5cc2e8ffa53d60edbb65b8c7173f27e69c338","user":{"login":"fsferrara","id":4817767,"avatar_url":"https://avatars.githubusercontent.com/u/4817767?v=3","gravatar_id":"","url":"https://api.github.com/users/fsferrara","html_url":"https://github.com/fsferrara","followers_url":"https://api.github.com/users/fsferrara/followers","following_url":"https://api.github.com/users/fsferrara/following{/other_user}","gists_url":"https://api.github.com/users/fsferrara/gists{/gist_id}","starred_url":"https://api.github.com/users/fsferrara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsferrara/subscriptions","organizations_url":"https://api.github.com/users/fsferrara/orgs","repos_url":"https://api.github.com/users/fsferrara/repos","events_url":"https://api.github.com/users/fsferrara/events{/privacy}","received_events_url":"https://api.github.com/users/fsferrara/received_events","type":"User","site_admin":false},"repo":{"id":64930080,"name":"unusually-large-number","full_name":"fsferrara/unusually-large-number","owner":{"login":"fsferrara","id":4817767,"avatar_url":"https://avatars.githubusercontent.com/u/4817767?v=3","gravatar_id":"","url":"https://api.github.com/users/fsferrara","html_url":"https://github.com/fsferrara","followers_url":"https://api.github.com/users/fsferrara/followers","following_url":"https://api.github.com/users/fsferrara/following{/other_user}","gists_url":"https://api.github.com/users/fsferrara/gists{/gist_id}","starred_url":"https://api.github.com/users/fsferrara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsferrara/subscriptions","organizations_url":"https://api.github.com/users/fsferrara/orgs","repos_url":"https://api.github.com/users/fsferrara/repos","events_url":"https://api.github.com/users/fsferrara/events{/privacy}","received_events_url":"https://api.github.com/users/fsferrara/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fsferrara/unusually-large-number","description":null,"fork":true,"url":"https://api.github.com/repos/fsferrara/unusually-large-number","forks_url":"https://api.github.com/repos/fsferrara/unusually-large-number/forks","keys_url":"https://api.github.com/repos/fsferrara/unusually-large-number/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fsferrara/unusually-large-number/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fsferrara/unusually-large-number/teams","hooks_url":"https://api.github.com/repos/fsferrara/unusually-large-number/hooks","issue_events_url":"https://api.github.com/repos/fsferrara/unusually-large-number/issues/events{/number}","events_url":"https://api.github.com/repos/fsferrara/unusually-large-number/events","assignees_url":"https://api.github.com/repos/fsferrara/unusually-large-number/assignees{/user}","branches_url":"https://api.github.com/repos/fsferrara/unusually-large-number/branches{/branch}","tags_url":"https://api.github.com/repos/fsferrara/unusually-large-number/tags","blobs_url":"https://api.github.com/repos/fsferrara/unusually-large-number/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fsferrara/unusually-large-number/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fsferrara/unusually-large-number/git/refs{/sha}","trees_url":"https://api.github.com/repos/fsferrara/unusually-large-number/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fsferrara/unusually-large-number/statuses/{sha}","languages_url":"https://api.github.com/repos/fsferrara/unusually-large-number/languages","stargazers_url":"https://api.github.com/repos/fsferrara/unusually-large-number/stargazers","contributors_url":"https://api.github.com/repos/fsferrara/unusually-large-number/contributors","subscribers_url":"https://api.github.com/repos/fsferrara/unusually-large-number/subscribers","subscription_url":"https://api.github.com/repos/fsferrara/unusually-large-number/subscription","commits_url":"https://api.github.com/repos/fsferrara/unusually-large-number/commits{/sha}","git_commits_url":"https://api.github.com/repos/fsferrara/unusually-large-number/git/commits{/sha}","comments_url":"https://api.github.com/repos/fsferrara/unusually-large-number/comments{/number}","issue_comment_url":"https://api.github.com/repos/fsferrara/unusually-large-number/issues/comments{/number}","contents_url":"https://api.github.com/repos/fsferrara/unusually-large-number/contents/{+path}","compare_url":"https://api.github.com/repos/fsferrara/unusually-large-number/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fsferrara/unusually-large-number/merges","archive_url":"https://api.github.com/repos/fsferrara/unusually-large-number/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fsferrara/unusually-large-number/downloads","issues_url":"https://api.github.com/repos/fsferrara/unusually-large-number/issues{/number}","pulls_url":"https://api.github.com/repos/fsferrara/unusually-large-number/pulls{/number}","milestones_url":"https://api.github.com/repos/fsferrara/unusually-large-number/milestones{/number}","notifications_url":"https://api.github.com/repos/fsferrara/unusually-large-number/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fsferrara/unusually-large-number/labels{/name}","releases_url":"https://api.github.com/repos/fsferrara/unusually-large-number/releases{/id}","deployments_url":"https://api.github.com/repos/fsferrara/unusually-large-number/deployments","created_at":"2016-08-04T11:44:13Z","updated_at":"2016-08-04T11:44:14Z","pushed_at":"2016-08-09T19:47:46Z","git_url":"git://github.com/fsferrara/unusually-large-number.git","ssh_url":"git@github.com:fsferrara/unusually-large-number.git","clone_url":"https://github.com/fsferrara/unusually-large-number.git","svn_url":"https://github.com/fsferrara/unusually-large-number","homepage":null,"size":3,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"HcomCoolCode:master","ref":"master","sha":"4a45d2c100613f898f8d7ac7a0c509276cdf7bf0","user":{"login":"HcomCoolCode","id":17494217,"avatar_url":"https://avatars.githubusercontent.com/u/17494217?v=3","gravatar_id":"","url":"https://api.github.com/users/HcomCoolCode","html_url":"https://github.com/HcomCoolCode","followers_url":"https://api.github.com/users/HcomCoolCode/followers","following_url":"https://api.github.com/users/HcomCoolCode/following{/other_user}","gists_url":"https://api.github.com/users/HcomCoolCode/gists{/gist_id}","starred_url":"https://api.github.com/users/HcomCoolCode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HcomCoolCode/subscriptions","organizations_url":"https://api.github.com/users/HcomCoolCode/orgs","repos_url":"https://api.github.com/users/HcomCoolCode/repos","events_url":"https://api.github.com/users/HcomCoolCode/events{/privacy}","received_events_url":"https://api.github.com/users/HcomCoolCode/received_events","type":"Organization","site_admin":false},"repo":{"id":64744471,"name":"unusually-large-number","full_name":"HcomCoolCode/unusually-large-number","owner":{"login":"HcomCoolCode","id":17494217,"avatar_url":"https://avatars.githubusercontent.com/u/17494217?v=3","gravatar_id":"","url":"https://api.github.com/users/HcomCoolCode","html_url":"https://github.com/HcomCoolCode","followers_url":"https://api.github.com/users/HcomCoolCode/followers","following_url":"https://api.github.com/users/HcomCoolCode/following{/other_user}","gists_url":"https://api.github.com/users/HcomCoolCode/gists{/gist_id}","starred_url":"https://api.github.com/users/HcomCoolCode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HcomCoolCode/subscriptions","organizations_url":"https://api.github.com/users/HcomCoolCode/orgs","repos_url":"https://api.github.com/users/HcomCoolCode/repos","events_url":"https://api.github.com/users/HcomCoolCode/events{/privacy}","received_events_url":"https://api.github.com/users/HcomCoolCode/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HcomCoolCode/unusually-large-number","description":null,"fork":false,"url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number","forks_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/forks","keys_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/teams","hooks_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/hooks","issue_events_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/issues/events{/number}","events_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/events","assignees_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/assignees{/user}","branches_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/branches{/branch}","tags_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/tags","blobs_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/git/refs{/sha}","trees_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/statuses/{sha}","languages_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/languages","stargazers_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/stargazers","contributors_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/contributors","subscribers_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/subscribers","subscription_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/subscription","commits_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/commits{/sha}","git_commits_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/git/commits{/sha}","comments_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/comments{/number}","issue_comment_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/issues/comments{/number}","contents_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/contents/{+path}","compare_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/merges","archive_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/downloads","issues_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/issues{/number}","pulls_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/pulls{/number}","milestones_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/milestones{/number}","notifications_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/labels{/name}","releases_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/releases{/id}","deployments_url":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/deployments","created_at":"2016-08-02T09:41:43Z","updated_at":"2016-08-02T16:02:02Z","pushed_at":"2016-08-09T19:47:46Z","git_url":"git://github.com/HcomCoolCode/unusually-large-number.git","ssh_url":"git@github.com:HcomCoolCode/unusually-large-number.git","clone_url":"https://github.com/HcomCoolCode/unusually-large-number.git","svn_url":"https://github.com/HcomCoolCode/unusually-large-number","homepage":null,"size":1,"stargazers_count":1,"watchers_count":1,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/pulls/1"},"html":{"href":"https://github.com/HcomCoolCode/unusually-large-number/pull/1"},"issue":{"href":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/issues/1"},"comments":{"href":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/HcomCoolCode/unusually-large-number/statuses/7ce5cc2e8ffa53d60edbb65b8c7173f27e69c338"}}}}
{"actor":{"display_login":"fsferrara"}}