{"action":"created","comment":{"url":"https://api.github.com/repos/freeCodeCamp/guide/pulls/comments/218787008","pull_request_review_id":156799240,"id":218787008,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxODc4NzAwOA==","diff_hunk":"@@ -0,0 +1,46 @@\n+---\n+title: Selection Sort\n+---\n+## Selection Sort\n+\n+* Selection Sort is a simple sorting technique that divides the list into two groups – Sorted and Unsorted. \n+* After each pass, the element with the least value(in the unsorted group) is found and swapped with the first element in the unsorted group.\n+* If there are n elements in the list, a total of (n-1) passes are required to sort the list completely.\n+\n+#### Example : Acsending Order\n+\n+Below is the original list/array in unsorted order.\n+\n+![Original List](https://github.com/abbas10m/SortingAlgorithms/blob/master/selectionSort/originalList.PNG)\n+\n+At 1st pass, the least element (8) is swapped with the first element (23)\n+\n+![Move least to first position at first pass](https://github.com/abbas10m/SortingAlgorithms/blob/master/selectionSort/2-OGSwap.PNG)\n+\n+At 2nd pass, the least element in the unsorted list (23) is swapped with the first element in the unsorted group (78)\n+\n+![At pass 2](https://github.com/abbas10m/SortingAlgorithms/blob/master/selectionSort/3-AfterPass1.PNG)\n+\n+At 3rd pass, the least element in the unsorted list (32) is swapped with the first element in the unsorted group (45)\n+\n+![At pass 3](https://github.com/abbas10m/SortingAlgorithms/blob/master/selectionSort/4-AfterPass2.PNG)\n+\n+At 4th pass, the least element in the unsorted list (45) is swapped with the first element in the unsorted group (78)\n+\n+![At pass 4](https://github.com/abbas10m/SortingAlgorithms/blob/master/selectionSort/5-AfterPass3.PNG)\n+\n+At 5th pass, the least element in the unsorted list (56) is swapped with the first element in the unsorted group (78)\n+\n+![At pass 4](https://github.com/abbas10m/SortingAlgorithms/blob/master/selectionSort/6-AfterPass4.PNG)\n+\n+After the 5th pass, the list is sorted in acsending order.","path":"src/pages/algorithms/sorting-algorithms/selection-sort/index.md","position":36,"original_position":36,"commit_id":"2cf9bca4c2e11a29f0d615db6cdda856d5f7363e","original_commit_id":"2cf9bca4c2e11a29f0d615db6cdda856d5f7363e","user":{"login":"ezioda004","id":20020273,"node_id":"MDQ6VXNlcjIwMDIwMjcz","avatar_url":"https://avatars0.githubusercontent.com/u/20020273?v=4","gravatar_id":"","url":"https://api.github.com/users/ezioda004","html_url":"https://github.com/ezioda004","followers_url":"https://api.github.com/users/ezioda004/followers","following_url":"https://api.github.com/users/ezioda004/following{/other_user}","gists_url":"https://api.github.com/users/ezioda004/gists{/gist_id}","starred_url":"https://api.github.com/users/ezioda004/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezioda004/subscriptions","organizations_url":"https://api.github.com/users/ezioda004/orgs","repos_url":"https://api.github.com/users/ezioda004/repos","events_url":"https://api.github.com/users/ezioda004/events{/privacy}","received_events_url":"https://api.github.com/users/ezioda004/received_events","type":"User","site_admin":false},"body":"Typo - **acsending** should be ascending.\r\nGreat write up, may I suggest you add the runtime and space complexity for selection sort? For the [reference](http://bigocheatsheet.com/)","created_at":"2018-09-19T12:43:29Z","updated_at":"2018-09-19T12:43:30Z","html_url":"https://github.com/freeCodeCamp/guide/pull/5405#discussion_r218787008","pull_request_url":"https://api.github.com/repos/freeCodeCamp/guide/pulls/5405","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/freeCodeCamp/guide/pulls/comments/218787008"},"html":{"href":"https://github.com/freeCodeCamp/guide/pull/5405#discussion_r218787008"},"pull_request":{"href":"https://api.github.com/repos/freeCodeCamp/guide/pulls/5405"}}},"pull_request":{"url":"https://api.github.com/repos/freeCodeCamp/guide/pulls/5405","id":149126816,"node_id":"MDExOlB1bGxSZXF1ZXN0MTQ5MTI2ODE2","html_url":"https://github.com/freeCodeCamp/guide/pull/5405","diff_url":"https://github.com/freeCodeCamp/guide/pull/5405.diff","patch_url":"https://github.com/freeCodeCamp/guide/pull/5405.patch","issue_url":"https://api.github.com/repos/freeCodeCamp/guide/issues/5405","number":5405,"state":"open","locked":false,"title":"Created new article on selection sort","user":{"login":"abbas10m","id":13021024,"node_id":"MDQ6VXNlcjEzMDIxMDI0","avatar_url":"https://avatars1.githubusercontent.com/u/13021024?v=4","gravatar_id":"","url":"https://api.github.com/users/abbas10m","html_url":"https://github.com/abbas10m","followers_url":"https://api.github.com/users/abbas10m/followers","following_url":"https://api.github.com/users/abbas10m/following{/other_user}","gists_url":"https://api.github.com/users/abbas10m/gists{/gist_id}","starred_url":"https://api.github.com/users/abbas10m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abbas10m/subscriptions","organizations_url":"https://api.github.com/users/abbas10m/orgs","repos_url":"https://api.github.com/users/abbas10m/repos","events_url":"https://api.github.com/users/abbas10m/events{/privacy}","received_events_url":"https://api.github.com/users/abbas10m/received_events","type":"User","site_admin":false},"body":"added basic description with example and explanation. \r\nPseudo code pending\r\n\r\n<!--\r\nThanks for contributing to the freeCodeCamp Guide! Before you open your pull request (PR), please make sure to do the following:\r\n\r\n- Avoid a duplicate PR: search through the open pull requests to check that there is not a PR already open that writes the same article or makes similar changes\r\n- Your changes pass the Travis CI build: any new folder you create in \"src/pages\" must have an index.md. All articles must have the following as the first three lines in the file:\r\n\r\n---\r\ntitle: Title of the article that shows up in the site's menu\r\n---\r\n\r\n- If you edit a stub article, your changes are substantial enough to justify removing the stub text (\"This article is a stub...\" part). We can't accept PRs that only add links to the \"More Information\" section - a repository script will automatically delete any changes (and revert it to the stub template) if the stub language is still in that file\r\n- Your PR has a descriptive name (NOT: Update index.md): for example, if you create a \"Variables\" article inside the \"Python\" directory, the pull request title should be \"Python: add Variables article\". Other examples are \"Git: edit Git Commit article\" or \"PHP: create PHP section and add Data Structures article\"\r\n- Add a short description below describing your changes\r\n\r\n-->\r\n\r\n**Description**\r\n","created_at":"2017-10-27T08:19:55Z","updated_at":"2018-09-19T12:43:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a872e387df6a73ae5cf24eaff3d139a90b204381","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/freeCodeCamp/guide/pulls/5405/commits","review_comments_url":"https://api.github.com/repos/freeCodeCamp/guide/pulls/5405/comments","review_comment_url":"https://api.github.com/repos/freeCodeCamp/guide/pulls/comments{/number}","comments_url":"https://api.github.com/repos/freeCodeCamp/guide/issues/5405/comments","statuses_url":"https://api.github.com/repos/freeCodeCamp/guide/statuses/2cf9bca4c2e11a29f0d615db6cdda856d5f7363e","head":{"label":"abbas10m:patch-2","ref":"patch-2","sha":"2cf9bca4c2e11a29f0d615db6cdda856d5f7363e","user":{"login":"abbas10m","id":13021024,"node_id":"MDQ6VXNlcjEzMDIxMDI0","avatar_url":"https://avatars1.githubusercontent.com/u/13021024?v=4","gravatar_id":"","url":"https://api.github.com/users/abbas10m","html_url":"https://github.com/abbas10m","followers_url":"https://api.github.com/users/abbas10m/followers","following_url":"https://api.github.com/users/abbas10m/following{/other_user}","gists_url":"https://api.github.com/users/abbas10m/gists{/gist_id}","starred_url":"https://api.github.com/users/abbas10m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abbas10m/subscriptions","organizations_url":"https://api.github.com/users/abbas10m/orgs","repos_url":"https://api.github.com/users/abbas10m/repos","events_url":"https://api.github.com/users/abbas10m/events{/privacy}","received_events_url":"https://api.github.com/users/abbas10m/received_events","type":"User","site_admin":false},"repo":{"id":108236005,"node_id":"MDEwOlJlcG9zaXRvcnkxMDgyMzYwMDU=","name":"guides","full_name":"abbas10m/guides","private":false,"owner":{"login":"abbas10m","id":13021024,"node_id":"MDQ6VXNlcjEzMDIxMDI0","avatar_url":"https://avatars1.githubusercontent.com/u/13021024?v=4","gravatar_id":"","url":"https://api.github.com/users/abbas10m","html_url":"https://github.com/abbas10m","followers_url":"https://api.github.com/users/abbas10m/followers","following_url":"https://api.github.com/users/abbas10m/following{/other_user}","gists_url":"https://api.github.com/users/abbas10m/gists{/gist_id}","starred_url":"https://api.github.com/users/abbas10m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abbas10m/subscriptions","organizations_url":"https://api.github.com/users/abbas10m/orgs","repos_url":"https://api.github.com/users/abbas10m/repos","events_url":"https://api.github.com/users/abbas10m/events{/privacy}","received_events_url":"https://api.github.com/users/abbas10m/received_events","type":"User","site_admin":false},"html_url":"https://github.com/abbas10m/guides","description":"A collection of easy-to-understand guides to programming tools","fork":true,"url":"https://api.github.com/repos/abbas10m/guides","forks_url":"https://api.github.com/repos/abbas10m/guides/forks","keys_url":"https://api.github.com/repos/abbas10m/guides/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abbas10m/guides/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abbas10m/guides/teams","hooks_url":"https://api.github.com/repos/abbas10m/guides/hooks","issue_events_url":"https://api.github.com/repos/abbas10m/guides/issues/events{/number}","events_url":"https://api.github.com/repos/abbas10m/guides/events","assignees_url":"https://api.github.com/repos/abbas10m/guides/assignees{/user}","branches_url":"https://api.github.com/repos/abbas10m/guides/branches{/branch}","tags_url":"https://api.github.com/repos/abbas10m/guides/tags","blobs_url":"https://api.github.com/repos/abbas10m/guides/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abbas10m/guides/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abbas10m/guides/git/refs{/sha}","trees_url":"https://api.github.com/repos/abbas10m/guides/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abbas10m/guides/statuses/{sha}","languages_url":"https://api.github.com/repos/abbas10m/guides/languages","stargazers_url":"https://api.github.com/repos/abbas10m/guides/stargazers","contributors_url":"https://api.github.com/repos/abbas10m/guides/contributors","subscribers_url":"https://api.github.com/repos/abbas10m/guides/subscribers","subscription_url":"https://api.github.com/repos/abbas10m/guides/subscription","commits_url":"https://api.github.com/repos/abbas10m/guides/commits{/sha}","git_commits_url":"https://api.github.com/repos/abbas10m/guides/git/commits{/sha}","comments_url":"https://api.github.com/repos/abbas10m/guides/comments{/number}","issue_comment_url":"https://api.github.com/repos/abbas10m/guides/issues/comments{/number}","contents_url":"https://api.github.com/repos/abbas10m/guides/contents/{+path}","compare_url":"https://api.github.com/repos/abbas10m/guides/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abbas10m/guides/merges","archive_url":"https://api.github.com/repos/abbas10m/guides/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abbas10m/guides/downloads","issues_url":"https://api.github.com/repos/abbas10m/guides/issues{/number}","pulls_url":"https://api.github.com/repos/abbas10m/guides/pulls{/number}","milestones_url":"https://api.github.com/repos/abbas10m/guides/milestones{/number}","notifications_url":"https://api.github.com/repos/abbas10m/guides/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abbas10m/guides/labels{/name}","releases_url":"https://api.github.com/repos/abbas10m/guides/releases{/id}","deployments_url":"https://api.github.com/repos/abbas10m/guides/deployments","created_at":"2017-10-25T07:35:43Z","updated_at":"2017-10-25T07:35:48Z","pushed_at":"2018-06-24T14:43:06Z","git_url":"git://github.com/abbas10m/guides.git","ssh_url":"git@github.com:abbas10m/guides.git","clone_url":"https://github.com/abbas10m/guides.git","svn_url":"https://github.com/abbas10m/guides","homepage":"https://guide.freecodecamp.org","size":29614,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"freeCodeCamp:master","ref":"master","sha":"e8b717a53f36ae5f81a0b06c9e7e5e8489a2a846","user":{"login":"freeCodeCamp","id":9892522,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk4OTI1MjI=","avatar_url":"https://avatars0.githubusercontent.com/u/9892522?v=4","gravatar_id":"","url":"https://api.github.com/users/freeCodeCamp","html_url":"https://github.com/freeCodeCamp","followers_url":"https://api.github.com/users/freeCodeCamp/followers","following_url":"https://api.github.com/users/freeCodeCamp/following{/other_user}","gists_url":"https://api.github.com/users/freeCodeCamp/gists{/gist_id}","starred_url":"https://api.github.com/users/freeCodeCamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freeCodeCamp/subscriptions","organizations_url":"https://api.github.com/users/freeCodeCamp/orgs","repos_url":"https://api.github.com/users/freeCodeCamp/repos","events_url":"https://api.github.com/users/freeCodeCamp/events{/privacy}","received_events_url":"https://api.github.com/users/freeCodeCamp/received_events","type":"Organization","site_admin":false},"repo":{"id":93097839,"node_id":"MDEwOlJlcG9zaXRvcnk5MzA5NzgzOQ==","name":"guide","full_name":"freeCodeCamp/guide","private":false,"owner":{"login":"freeCodeCamp","id":9892522,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk4OTI1MjI=","avatar_url":"https://avatars0.githubusercontent.com/u/9892522?v=4","gravatar_id":"","url":"https://api.github.com/users/freeCodeCamp","html_url":"https://github.com/freeCodeCamp","followers_url":"https://api.github.com/users/freeCodeCamp/followers","following_url":"https://api.github.com/users/freeCodeCamp/following{/other_user}","gists_url":"https://api.github.com/users/freeCodeCamp/gists{/gist_id}","starred_url":"https://api.github.com/users/freeCodeCamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freeCodeCamp/subscriptions","organizations_url":"https://api.github.com/users/freeCodeCamp/orgs","repos_url":"https://api.github.com/users/freeCodeCamp/repos","events_url":"https://api.github.com/users/freeCodeCamp/events{/privacy}","received_events_url":"https://api.github.com/users/freeCodeCamp/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/freeCodeCamp/guide","description":"A collection of easy-to-understand guides to programming tools","fork":false,"url":"https://api.github.com/repos/freeCodeCamp/guide","forks_url":"https://api.github.com/repos/freeCodeCamp/guide/forks","keys_url":"https://api.github.com/repos/freeCodeCamp/guide/keys{/key_id}","collaborators_url":"https://api.github.com/repos/freeCodeCamp/guide/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/freeCodeCamp/guide/teams","hooks_url":"https://api.github.com/repos/freeCodeCamp/guide/hooks","issue_events_url":"https://api.github.com/repos/freeCodeCamp/guide/issues/events{/number}","events_url":"https://api.github.com/repos/freeCodeCamp/guide/events","assignees_url":"https://api.github.com/repos/freeCodeCamp/guide/assignees{/user}","branches_url":"https://api.github.com/repos/freeCodeCamp/guide/branches{/branch}","tags_url":"https://api.github.com/repos/freeCodeCamp/guide/tags","blobs_url":"https://api.github.com/repos/freeCodeCamp/guide/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/freeCodeCamp/guide/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/freeCodeCamp/guide/git/refs{/sha}","trees_url":"https://api.github.com/repos/freeCodeCamp/guide/git/trees{/sha}","statuses_url":"https://api.github.com/repos/freeCodeCamp/guide/statuses/{sha}","languages_url":"https://api.github.com/repos/freeCodeCamp/guide/languages","stargazers_url":"https://api.github.com/repos/freeCodeCamp/guide/stargazers","contributors_url":"https://api.github.com/repos/freeCodeCamp/guide/contributors","subscribers_url":"https://api.github.com/repos/freeCodeCamp/guide/subscribers","subscription_url":"https://api.github.com/repos/freeCodeCamp/guide/subscription","commits_url":"https://api.github.com/repos/freeCodeCamp/guide/commits{/sha}","git_commits_url":"https://api.github.com/repos/freeCodeCamp/guide/git/commits{/sha}","comments_url":"https://api.github.com/repos/freeCodeCamp/guide/comments{/number}","issue_comment_url":"https://api.github.com/repos/freeCodeCamp/guide/issues/comments{/number}","contents_url":"https://api.github.com/repos/freeCodeCamp/guide/contents/{+path}","compare_url":"https://api.github.com/repos/freeCodeCamp/guide/compare/{base}...{head}","merges_url":"https://api.github.com/repos/freeCodeCamp/guide/merges","archive_url":"https://api.github.com/repos/freeCodeCamp/guide/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/freeCodeCamp/guide/downloads","issues_url":"https://api.github.com/repos/freeCodeCamp/guide/issues{/number}","pulls_url":"https://api.github.com/repos/freeCodeCamp/guide/pulls{/number}","milestones_url":"https://api.github.com/repos/freeCodeCamp/guide/milestones{/number}","notifications_url":"https://api.github.com/repos/freeCodeCamp/guide/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/freeCodeCamp/guide/labels{/name}","releases_url":"https://api.github.com/repos/freeCodeCamp/guide/releases{/id}","deployments_url":"https://api.github.com/repos/freeCodeCamp/guide/deployments","created_at":"2017-06-01T20:42:56Z","updated_at":"2018-09-19T12:34:36Z","pushed_at":"2018-09-19T08:41:26Z","git_url":"git://github.com/freeCodeCamp/guide.git","ssh_url":"git@github.com:freeCodeCamp/guide.git","clone_url":"https://github.com/freeCodeCamp/guide.git","svn_url":"https://github.com/freeCodeCamp/guide","homepage":"https://guide.freecodecamp.org","size":63643,"stargazers_count":1781,"watchers_count":1781,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3602,"mirror_url":null,"archived":false,"open_issues_count":1037,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":3602,"open_issues":1037,"watchers":1781,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/freeCodeCamp/guide/pulls/5405"},"html":{"href":"https://github.com/freeCodeCamp/guide/pull/5405"},"issue":{"href":"https://api.github.com/repos/freeCodeCamp/guide/issues/5405"},"comments":{"href":"https://api.github.com/repos/freeCodeCamp/guide/issues/5405/comments"},"review_comments":{"href":"https://api.github.com/repos/freeCodeCamp/guide/pulls/5405/comments"},"review_comment":{"href":"https://api.github.com/repos/freeCodeCamp/guide/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/freeCodeCamp/guide/pulls/5405/commits"},"statuses":{"href":"https://api.github.com/repos/freeCodeCamp/guide/statuses/2cf9bca4c2e11a29f0d615db6cdda856d5f7363e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ezioda004"}}