{"action":"created","comment":{"url":"https://api.github.com/repos/gtklocker/mbalamat-algo/pulls/comments/31392367","id":31392367,"diff_hunk":"@@ -0,0 +1,32 @@\n+import java.util.*;\n+\n+public class BubbleSort {\n+    public static void main(String[] args) {\n+        Scanner in = new Scanner(System.in);\n+        int n = in.nextInt();\n+        int list[] = new int[n];\n+\n+        System.out.println(\"Array before bubble sort:\");\n+        for (int i = 0; i <= n - 1; ++i) {\n+            list[i] = in.nextInt();\n+            System.out.print(\" \" + list[i]);\n+        }\n+\n+        //BubbleSort\n+        for (int i = 1; i < n; ++i) {\n+            for (int j = 0; j < n - i; ++j) {\n+                if (list[j] > list[j + 1]) {\n+                    int temp = list[j];\n+                    list[j] = list[j + 1];\n+                    list[j + 1] = temp;\n+                }\n+            }\n+        }\n+\n+        //Print Sorted Array\n+        System.out.println(\"\\n\\nSorted Array is:\");\n+        for (int i = 0; i <= n - 1; ++i) {","path":"bubblesort/BubbleSort.java","position":28,"original_position":28,"commit_id":"0d928c682d288214b4a6bd2423320b776e1caf50","original_commit_id":"0d928c682d288214b4a6bd2423320b776e1caf50","user":{"login":"gtklocker","id":732062,"avatar_url":"https://avatars.githubusercontent.com/u/732062?v=3","gravatar_id":"","url":"https://api.github.com/users/gtklocker","html_url":"https://github.com/gtklocker","followers_url":"https://api.github.com/users/gtklocker/followers","following_url":"https://api.github.com/users/gtklocker/following{/other_user}","gists_url":"https://api.github.com/users/gtklocker/gists{/gist_id}","starred_url":"https://api.github.com/users/gtklocker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gtklocker/subscriptions","organizations_url":"https://api.github.com/users/gtklocker/orgs","repos_url":"https://api.github.com/users/gtklocker/repos","events_url":"https://api.github.com/users/gtklocker/events{/privacy}","received_events_url":"https://api.github.com/users/gtklocker/received_events","type":"User","site_admin":false},"body":"nit: Use < n instead of <= n - 1.","created_at":"2015-05-31T17:20:08Z","updated_at":"2015-05-31T17:20:08Z","html_url":"https://github.com/gtklocker/mbalamat-algo/pull/3#discussion_r31392367","pull_request_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/gtklocker/mbalamat-algo/pulls/comments/31392367"},"html":{"href":"https://github.com/gtklocker/mbalamat-algo/pull/3#discussion_r31392367"},"pull_request":{"href":"https://api.github.com/repos/gtklocker/mbalamat-algo/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/gtklocker/mbalamat-algo/pulls/3","id":36585626,"html_url":"https://github.com/gtklocker/mbalamat-algo/pull/3","diff_url":"https://github.com/gtklocker/mbalamat-algo/pull/3.diff","patch_url":"https://github.com/gtklocker/mbalamat-algo/pull/3.patch","issue_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/issues/3","number":3,"state":"open","locked":false,"title":"Add bubble sort","user":{"login":"mbalamat","id":7872396,"avatar_url":"https://avatars.githubusercontent.com/u/7872396?v=3","gravatar_id":"","url":"https://api.github.com/users/mbalamat","html_url":"https://github.com/mbalamat","followers_url":"https://api.github.com/users/mbalamat/followers","following_url":"https://api.github.com/users/mbalamat/following{/other_user}","gists_url":"https://api.github.com/users/mbalamat/gists{/gist_id}","starred_url":"https://api.github.com/users/mbalamat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbalamat/subscriptions","organizations_url":"https://api.github.com/users/mbalamat/orgs","repos_url":"https://api.github.com/users/mbalamat/repos","events_url":"https://api.github.com/users/mbalamat/events{/privacy}","received_events_url":"https://api.github.com/users/mbalamat/received_events","type":"User","site_admin":false},"body":"I have added the BubbleSort algorithm.","created_at":"2015-05-31T17:18:46Z","updated_at":"2015-05-31T17:20:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"73e9ec4edcdf69c2cbf5837d40117203e557230b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/pulls/3/commits","review_comments_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/pulls/3/comments","review_comment_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/issues/3/comments","statuses_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/statuses/0d928c682d288214b4a6bd2423320b776e1caf50","head":{"label":"mbalamat:add_bubble_sort","ref":"add_bubble_sort","sha":"0d928c682d288214b4a6bd2423320b776e1caf50","user":{"login":"mbalamat","id":7872396,"avatar_url":"https://avatars.githubusercontent.com/u/7872396?v=3","gravatar_id":"","url":"https://api.github.com/users/mbalamat","html_url":"https://github.com/mbalamat","followers_url":"https://api.github.com/users/mbalamat/followers","following_url":"https://api.github.com/users/mbalamat/following{/other_user}","gists_url":"https://api.github.com/users/mbalamat/gists{/gist_id}","starred_url":"https://api.github.com/users/mbalamat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbalamat/subscriptions","organizations_url":"https://api.github.com/users/mbalamat/orgs","repos_url":"https://api.github.com/users/mbalamat/repos","events_url":"https://api.github.com/users/mbalamat/events{/privacy}","received_events_url":"https://api.github.com/users/mbalamat/received_events","type":"User","site_admin":false},"repo":{"id":36175082,"name":"mbalamat-algo","full_name":"mbalamat/mbalamat-algo","owner":{"login":"mbalamat","id":7872396,"avatar_url":"https://avatars.githubusercontent.com/u/7872396?v=3","gravatar_id":"","url":"https://api.github.com/users/mbalamat","html_url":"https://github.com/mbalamat","followers_url":"https://api.github.com/users/mbalamat/followers","following_url":"https://api.github.com/users/mbalamat/following{/other_user}","gists_url":"https://api.github.com/users/mbalamat/gists{/gist_id}","starred_url":"https://api.github.com/users/mbalamat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbalamat/subscriptions","organizations_url":"https://api.github.com/users/mbalamat/orgs","repos_url":"https://api.github.com/users/mbalamat/repos","events_url":"https://api.github.com/users/mbalamat/events{/privacy}","received_events_url":"https://api.github.com/users/mbalamat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mbalamat/mbalamat-algo","description":"","fork":true,"url":"https://api.github.com/repos/mbalamat/mbalamat-algo","forks_url":"https://api.github.com/repos/mbalamat/mbalamat-algo/forks","keys_url":"https://api.github.com/repos/mbalamat/mbalamat-algo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mbalamat/mbalamat-algo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mbalamat/mbalamat-algo/teams","hooks_url":"https://api.github.com/repos/mbalamat/mbalamat-algo/hooks","issue_events_url":"https://api.github.com/repos/mbalamat/mbalamat-algo/issues/events{/number}","events_url":"https://api.github.com/repos/mbalamat/mbalamat-algo/events","assignees_url":"https://api.github.com/repos/mbalamat/mbalamat-algo/assignees{/user}","branches_url":"https://api.github.com/repos/mbalamat/mbalamat-algo/branches{/branch}","tags_url":"https://api.github.com/repos/mbalamat/mbalamat-algo/tags","blobs_url":"https://api.github.com/repos/mbalamat/mbalamat-algo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mbalamat/mbalamat-algo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mbalamat/mbalamat-algo/git/refs{/sha}","trees_url":"https://api.github.com/repos/mbalamat/mbalamat-algo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mbalamat/mbalamat-algo/statuses/{sha}","languages_url":"https://api.github.com/repos/mbalamat/mbalamat-algo/languages","stargazers_url":"https://api.github.com/repos/mbalamat/mbalamat-algo/stargazers","contributors_url":"https://api.github.com/repos/mbalamat/mbalamat-algo/contributors","subscribers_url":"https://api.github.com/repos/mbalamat/mbalamat-algo/subscribers","subscription_url":"https://api.github.com/repos/mbalamat/mbalamat-algo/subscription","commits_url":"https://api.github.com/repos/mbalamat/mbalamat-algo/commits{/sha}","git_commits_url":"https://api.github.com/repos/mbalamat/mbalamat-algo/git/commits{/sha}","comments_url":"https://api.github.com/repos/mbalamat/mbalamat-algo/comments{/number}","issue_comment_url":"https://api.github.com/repos/mbalamat/mbalamat-algo/issues/comments{/number}","contents_url":"https://api.github.com/repos/mbalamat/mbalamat-algo/contents/{+path}","compare_url":"https://api.github.com/repos/mbalamat/mbalamat-algo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mbalamat/mbalamat-algo/merges","archive_url":"https://api.github.com/repos/mbalamat/mbalamat-algo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mbalamat/mbalamat-algo/downloads","issues_url":"https://api.github.com/repos/mbalamat/mbalamat-algo/issues{/number}","pulls_url":"https://api.github.com/repos/mbalamat/mbalamat-algo/pulls{/number}","milestones_url":"https://api.github.com/repos/mbalamat/mbalamat-algo/milestones{/number}","notifications_url":"https://api.github.com/repos/mbalamat/mbalamat-algo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mbalamat/mbalamat-algo/labels{/name}","releases_url":"https://api.github.com/repos/mbalamat/mbalamat-algo/releases{/id}","created_at":"2015-05-24T14:06:23Z","updated_at":"2015-05-24T14:09:36Z","pushed_at":"2015-05-31T17:16:18Z","git_url":"git://github.com/mbalamat/mbalamat-algo.git","ssh_url":"git@github.com:mbalamat/mbalamat-algo.git","clone_url":"https://github.com/mbalamat/mbalamat-algo.git","svn_url":"https://github.com/mbalamat/mbalamat-algo","homepage":null,"size":105,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"gtklocker:master","ref":"master","sha":"eddd1342b6e85fc1d31624d35ad70da99a91885d","user":{"login":"gtklocker","id":732062,"avatar_url":"https://avatars.githubusercontent.com/u/732062?v=3","gravatar_id":"","url":"https://api.github.com/users/gtklocker","html_url":"https://github.com/gtklocker","followers_url":"https://api.github.com/users/gtklocker/followers","following_url":"https://api.github.com/users/gtklocker/following{/other_user}","gists_url":"https://api.github.com/users/gtklocker/gists{/gist_id}","starred_url":"https://api.github.com/users/gtklocker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gtklocker/subscriptions","organizations_url":"https://api.github.com/users/gtklocker/orgs","repos_url":"https://api.github.com/users/gtklocker/repos","events_url":"https://api.github.com/users/gtklocker/events{/privacy}","received_events_url":"https://api.github.com/users/gtklocker/received_events","type":"User","site_admin":false},"repo":{"id":36172813,"name":"mbalamat-algo","full_name":"gtklocker/mbalamat-algo","owner":{"login":"gtklocker","id":732062,"avatar_url":"https://avatars.githubusercontent.com/u/732062?v=3","gravatar_id":"","url":"https://api.github.com/users/gtklocker","html_url":"https://github.com/gtklocker","followers_url":"https://api.github.com/users/gtklocker/followers","following_url":"https://api.github.com/users/gtklocker/following{/other_user}","gists_url":"https://api.github.com/users/gtklocker/gists{/gist_id}","starred_url":"https://api.github.com/users/gtklocker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gtklocker/subscriptions","organizations_url":"https://api.github.com/users/gtklocker/orgs","repos_url":"https://api.github.com/users/gtklocker/repos","events_url":"https://api.github.com/users/gtklocker/events{/privacy}","received_events_url":"https://api.github.com/users/gtklocker/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gtklocker/mbalamat-algo","description":"","fork":false,"url":"https://api.github.com/repos/gtklocker/mbalamat-algo","forks_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/forks","keys_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/teams","hooks_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/hooks","issue_events_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/issues/events{/number}","events_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/events","assignees_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/assignees{/user}","branches_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/branches{/branch}","tags_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/tags","blobs_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/git/refs{/sha}","trees_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/statuses/{sha}","languages_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/languages","stargazers_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/stargazers","contributors_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/contributors","subscribers_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/subscribers","subscription_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/subscription","commits_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/commits{/sha}","git_commits_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/git/commits{/sha}","comments_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/comments{/number}","issue_comment_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/issues/comments{/number}","contents_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/contents/{+path}","compare_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/merges","archive_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/downloads","issues_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/issues{/number}","pulls_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/pulls{/number}","milestones_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/milestones{/number}","notifications_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/labels{/name}","releases_url":"https://api.github.com/repos/gtklocker/mbalamat-algo/releases{/id}","created_at":"2015-05-24T13:09:57Z","updated_at":"2015-05-25T18:21:41Z","pushed_at":"2015-05-31T17:18:47Z","git_url":"git://github.com/gtklocker/mbalamat-algo.git","ssh_url":"git@github.com:gtklocker/mbalamat-algo.git","clone_url":"https://github.com/gtklocker/mbalamat-algo.git","svn_url":"https://github.com/gtklocker/mbalamat-algo","homepage":null,"size":124,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gtklocker/mbalamat-algo/pulls/3"},"html":{"href":"https://github.com/gtklocker/mbalamat-algo/pull/3"},"issue":{"href":"https://api.github.com/repos/gtklocker/mbalamat-algo/issues/3"},"comments":{"href":"https://api.github.com/repos/gtklocker/mbalamat-algo/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/gtklocker/mbalamat-algo/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/gtklocker/mbalamat-algo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gtklocker/mbalamat-algo/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/gtklocker/mbalamat-algo/statuses/0d928c682d288214b4a6bd2423320b776e1caf50"}}}}