{"action":"created","comment":{"url":"https://api.github.com/repos/developeronly/algorithms/pulls/comments/92935561","pull_request_review_id":13458866,"id":92935561,"diff_hunk":"@@ -0,0 +1,42 @@\n+package com.example.chapter1.basicprogramming;\n+\n+//TODO: I'm not in favor of static methods. If someone want's make it better please contribute.\n+//TODO: I'm not able to make methods generic which accepts primitives. If someone make it better please contribute.\n+//TODO: Logic seems to duplicated. Refactor it!!\n+public class ReverseArray {\n+\n+\n+    public static int[] reverse(int[] numericArray) {\n+        int arrayLength = numericArray.length;\n+        if (arrayLength == 0) throw new IllegalArgumentException(\"Empty array.\");\n+        for (int index = 0; index < arrayLength / 2; index++) {\n+            int temp = numericArray[index];\n+            numericArray[index] = numericArray[arrayLength - 1 - index];\n+            numericArray[arrayLength - index - 1] = temp;\n+        }\n+        return numericArray;\n+    }\n+\n+    public static double[] reverse(double[] numericArray) {\n+        int arrayLength = numericArray.length;\n+        if (arrayLength == 0) throw new IllegalArgumentException(\"Empty array.\");\n+        for (int index = 0; index < arrayLength / 2; index++) {\n+            double temp = numericArray[index];\n+            numericArray[index] = numericArray[arrayLength - 1 - index];\n+            numericArray[arrayLength - index - 1] = temp;\n+        }\n+        return numericArray;\n+    }\n+\n+    public static <T> T[] reverse(T[] array) {","path":"src/main/java/com/example/chapter1/basicprogramming/ReverseArray.java","position":31,"original_position":31,"commit_id":"e44f00d84d4ed16dee85990185f7a66a96ae24be","original_commit_id":"e44f00d84d4ed16dee85990185f7a66a96ae24be","user":{"login":"developeronly","id":6268660,"avatar_url":"https://avatars.githubusercontent.com/u/6268660?v=3","gravatar_id":"","url":"https://api.github.com/users/developeronly","html_url":"https://github.com/developeronly","followers_url":"https://api.github.com/users/developeronly/followers","following_url":"https://api.github.com/users/developeronly/following{/other_user}","gists_url":"https://api.github.com/users/developeronly/gists{/gist_id}","starred_url":"https://api.github.com/users/developeronly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/developeronly/subscriptions","organizations_url":"https://api.github.com/users/developeronly/orgs","repos_url":"https://api.github.com/users/developeronly/repos","events_url":"https://api.github.com/users/developeronly/events{/privacy}","received_events_url":"https://api.github.com/users/developeronly/received_events","type":"User","site_admin":false},"body":":+1: :100: ","created_at":"2016-12-18T07:38:33Z","updated_at":"2016-12-18T07:38:33Z","html_url":"https://github.com/developeronly/algorithms/pull/1#discussion_r92935561","pull_request_url":"https://api.github.com/repos/developeronly/algorithms/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/developeronly/algorithms/pulls/comments/92935561"},"html":{"href":"https://github.com/developeronly/algorithms/pull/1#discussion_r92935561"},"pull_request":{"href":"https://api.github.com/repos/developeronly/algorithms/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/developeronly/algorithms/pulls/1","id":98467176,"html_url":"https://github.com/developeronly/algorithms/pull/1","diff_url":"https://github.com/developeronly/algorithms/pull/1.diff","patch_url":"https://github.com/developeronly/algorithms/pull/1.patch","issue_url":"https://api.github.com/repos/developeronly/algorithms/issues/1","number":1,"state":"open","locked":false,"title":"1.1 Fundamentals: Basic Programming Model","user":{"login":"developeronly","id":6268660,"avatar_url":"https://avatars.githubusercontent.com/u/6268660?v=3","gravatar_id":"","url":"https://api.github.com/users/developeronly","html_url":"https://github.com/developeronly","followers_url":"https://api.github.com/users/developeronly/followers","following_url":"https://api.github.com/users/developeronly/following{/other_user}","gists_url":"https://api.github.com/users/developeronly/gists{/gist_id}","starred_url":"https://api.github.com/users/developeronly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/developeronly/subscriptions","organizations_url":"https://api.github.com/users/developeronly/orgs","repos_url":"https://api.github.com/users/developeronly/repos","events_url":"https://api.github.com/users/developeronly/events{/privacy}","received_events_url":"https://api.github.com/users/developeronly/received_events","type":"User","site_admin":false},"body":"Have implemented programs which comes under the first section `1.1 Fundamentals: Basic Programming Model`\r\n-  Greatest Common Divisor\r\n- Reversing an array\r\n- Prime Number Checker \r\n- Binary Search\r\n","created_at":"2016-12-18T07:25:38Z","updated_at":"2016-12-18T07:52:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"73d3b7450135cbeafe9312d216eb43fe30730d20","assignee":{"login":"developeronly","id":6268660,"avatar_url":"https://avatars.githubusercontent.com/u/6268660?v=3","gravatar_id":"","url":"https://api.github.com/users/developeronly","html_url":"https://github.com/developeronly","followers_url":"https://api.github.com/users/developeronly/followers","following_url":"https://api.github.com/users/developeronly/following{/other_user}","gists_url":"https://api.github.com/users/developeronly/gists{/gist_id}","starred_url":"https://api.github.com/users/developeronly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/developeronly/subscriptions","organizations_url":"https://api.github.com/users/developeronly/orgs","repos_url":"https://api.github.com/users/developeronly/repos","events_url":"https://api.github.com/users/developeronly/events{/privacy}","received_events_url":"https://api.github.com/users/developeronly/received_events","type":"User","site_admin":false},"assignees":[{"login":"developeronly","id":6268660,"avatar_url":"https://avatars.githubusercontent.com/u/6268660?v=3","gravatar_id":"","url":"https://api.github.com/users/developeronly","html_url":"https://github.com/developeronly","followers_url":"https://api.github.com/users/developeronly/followers","following_url":"https://api.github.com/users/developeronly/following{/other_user}","gists_url":"https://api.github.com/users/developeronly/gists{/gist_id}","starred_url":"https://api.github.com/users/developeronly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/developeronly/subscriptions","organizations_url":"https://api.github.com/users/developeronly/orgs","repos_url":"https://api.github.com/users/developeronly/repos","events_url":"https://api.github.com/users/developeronly/events{/privacy}","received_events_url":"https://api.github.com/users/developeronly/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/developeronly/algorithms/pulls/1/commits","review_comments_url":"https://api.github.com/repos/developeronly/algorithms/pulls/1/comments","review_comment_url":"https://api.github.com/repos/developeronly/algorithms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/developeronly/algorithms/issues/1/comments","statuses_url":"https://api.github.com/repos/developeronly/algorithms/statuses/e44f00d84d4ed16dee85990185f7a66a96ae24be","head":{"label":"developeronly:fundamentals","ref":"fundamentals","sha":"e44f00d84d4ed16dee85990185f7a66a96ae24be","user":{"login":"developeronly","id":6268660,"avatar_url":"https://avatars.githubusercontent.com/u/6268660?v=3","gravatar_id":"","url":"https://api.github.com/users/developeronly","html_url":"https://github.com/developeronly","followers_url":"https://api.github.com/users/developeronly/followers","following_url":"https://api.github.com/users/developeronly/following{/other_user}","gists_url":"https://api.github.com/users/developeronly/gists{/gist_id}","starred_url":"https://api.github.com/users/developeronly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/developeronly/subscriptions","organizations_url":"https://api.github.com/users/developeronly/orgs","repos_url":"https://api.github.com/users/developeronly/repos","events_url":"https://api.github.com/users/developeronly/events{/privacy}","received_events_url":"https://api.github.com/users/developeronly/received_events","type":"User","site_admin":false},"repo":{"id":73616376,"name":"algorithms","full_name":"developeronly/algorithms","owner":{"login":"developeronly","id":6268660,"avatar_url":"https://avatars.githubusercontent.com/u/6268660?v=3","gravatar_id":"","url":"https://api.github.com/users/developeronly","html_url":"https://github.com/developeronly","followers_url":"https://api.github.com/users/developeronly/followers","following_url":"https://api.github.com/users/developeronly/following{/other_user}","gists_url":"https://api.github.com/users/developeronly/gists{/gist_id}","starred_url":"https://api.github.com/users/developeronly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/developeronly/subscriptions","organizations_url":"https://api.github.com/users/developeronly/orgs","repos_url":"https://api.github.com/users/developeronly/repos","events_url":"https://api.github.com/users/developeronly/events{/privacy}","received_events_url":"https://api.github.com/users/developeronly/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/developeronly/algorithms","description":null,"fork":false,"url":"https://api.github.com/repos/developeronly/algorithms","forks_url":"https://api.github.com/repos/developeronly/algorithms/forks","keys_url":"https://api.github.com/repos/developeronly/algorithms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/developeronly/algorithms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/developeronly/algorithms/teams","hooks_url":"https://api.github.com/repos/developeronly/algorithms/hooks","issue_events_url":"https://api.github.com/repos/developeronly/algorithms/issues/events{/number}","events_url":"https://api.github.com/repos/developeronly/algorithms/events","assignees_url":"https://api.github.com/repos/developeronly/algorithms/assignees{/user}","branches_url":"https://api.github.com/repos/developeronly/algorithms/branches{/branch}","tags_url":"https://api.github.com/repos/developeronly/algorithms/tags","blobs_url":"https://api.github.com/repos/developeronly/algorithms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/developeronly/algorithms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/developeronly/algorithms/git/refs{/sha}","trees_url":"https://api.github.com/repos/developeronly/algorithms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/developeronly/algorithms/statuses/{sha}","languages_url":"https://api.github.com/repos/developeronly/algorithms/languages","stargazers_url":"https://api.github.com/repos/developeronly/algorithms/stargazers","contributors_url":"https://api.github.com/repos/developeronly/algorithms/contributors","subscribers_url":"https://api.github.com/repos/developeronly/algorithms/subscribers","subscription_url":"https://api.github.com/repos/developeronly/algorithms/subscription","commits_url":"https://api.github.com/repos/developeronly/algorithms/commits{/sha}","git_commits_url":"https://api.github.com/repos/developeronly/algorithms/git/commits{/sha}","comments_url":"https://api.github.com/repos/developeronly/algorithms/comments{/number}","issue_comment_url":"https://api.github.com/repos/developeronly/algorithms/issues/comments{/number}","contents_url":"https://api.github.com/repos/developeronly/algorithms/contents/{+path}","compare_url":"https://api.github.com/repos/developeronly/algorithms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/developeronly/algorithms/merges","archive_url":"https://api.github.com/repos/developeronly/algorithms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/developeronly/algorithms/downloads","issues_url":"https://api.github.com/repos/developeronly/algorithms/issues{/number}","pulls_url":"https://api.github.com/repos/developeronly/algorithms/pulls{/number}","milestones_url":"https://api.github.com/repos/developeronly/algorithms/milestones{/number}","notifications_url":"https://api.github.com/repos/developeronly/algorithms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/developeronly/algorithms/labels{/name}","releases_url":"https://api.github.com/repos/developeronly/algorithms/releases{/id}","deployments_url":"https://api.github.com/repos/developeronly/algorithms/deployments","created_at":"2016-11-13T13:05:24Z","updated_at":"2016-11-13T13:05:24Z","pushed_at":"2016-12-18T07:25:38Z","git_url":"git://github.com/developeronly/algorithms.git","ssh_url":"git@github.com:developeronly/algorithms.git","clone_url":"https://github.com/developeronly/algorithms.git","svn_url":"https://github.com/developeronly/algorithms","homepage":null,"size":17,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"developeronly:develop","ref":"develop","sha":"41b7dbb17ef88b28f934201103b2cdbfb9782513","user":{"login":"developeronly","id":6268660,"avatar_url":"https://avatars.githubusercontent.com/u/6268660?v=3","gravatar_id":"","url":"https://api.github.com/users/developeronly","html_url":"https://github.com/developeronly","followers_url":"https://api.github.com/users/developeronly/followers","following_url":"https://api.github.com/users/developeronly/following{/other_user}","gists_url":"https://api.github.com/users/developeronly/gists{/gist_id}","starred_url":"https://api.github.com/users/developeronly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/developeronly/subscriptions","organizations_url":"https://api.github.com/users/developeronly/orgs","repos_url":"https://api.github.com/users/developeronly/repos","events_url":"https://api.github.com/users/developeronly/events{/privacy}","received_events_url":"https://api.github.com/users/developeronly/received_events","type":"User","site_admin":false},"repo":{"id":73616376,"name":"algorithms","full_name":"developeronly/algorithms","owner":{"login":"developeronly","id":6268660,"avatar_url":"https://avatars.githubusercontent.com/u/6268660?v=3","gravatar_id":"","url":"https://api.github.com/users/developeronly","html_url":"https://github.com/developeronly","followers_url":"https://api.github.com/users/developeronly/followers","following_url":"https://api.github.com/users/developeronly/following{/other_user}","gists_url":"https://api.github.com/users/developeronly/gists{/gist_id}","starred_url":"https://api.github.com/users/developeronly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/developeronly/subscriptions","organizations_url":"https://api.github.com/users/developeronly/orgs","repos_url":"https://api.github.com/users/developeronly/repos","events_url":"https://api.github.com/users/developeronly/events{/privacy}","received_events_url":"https://api.github.com/users/developeronly/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/developeronly/algorithms","description":null,"fork":false,"url":"https://api.github.com/repos/developeronly/algorithms","forks_url":"https://api.github.com/repos/developeronly/algorithms/forks","keys_url":"https://api.github.com/repos/developeronly/algorithms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/developeronly/algorithms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/developeronly/algorithms/teams","hooks_url":"https://api.github.com/repos/developeronly/algorithms/hooks","issue_events_url":"https://api.github.com/repos/developeronly/algorithms/issues/events{/number}","events_url":"https://api.github.com/repos/developeronly/algorithms/events","assignees_url":"https://api.github.com/repos/developeronly/algorithms/assignees{/user}","branches_url":"https://api.github.com/repos/developeronly/algorithms/branches{/branch}","tags_url":"https://api.github.com/repos/developeronly/algorithms/tags","blobs_url":"https://api.github.com/repos/developeronly/algorithms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/developeronly/algorithms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/developeronly/algorithms/git/refs{/sha}","trees_url":"https://api.github.com/repos/developeronly/algorithms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/developeronly/algorithms/statuses/{sha}","languages_url":"https://api.github.com/repos/developeronly/algorithms/languages","stargazers_url":"https://api.github.com/repos/developeronly/algorithms/stargazers","contributors_url":"https://api.github.com/repos/developeronly/algorithms/contributors","subscribers_url":"https://api.github.com/repos/developeronly/algorithms/subscribers","subscription_url":"https://api.github.com/repos/developeronly/algorithms/subscription","commits_url":"https://api.github.com/repos/developeronly/algorithms/commits{/sha}","git_commits_url":"https://api.github.com/repos/developeronly/algorithms/git/commits{/sha}","comments_url":"https://api.github.com/repos/developeronly/algorithms/comments{/number}","issue_comment_url":"https://api.github.com/repos/developeronly/algorithms/issues/comments{/number}","contents_url":"https://api.github.com/repos/developeronly/algorithms/contents/{+path}","compare_url":"https://api.github.com/repos/developeronly/algorithms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/developeronly/algorithms/merges","archive_url":"https://api.github.com/repos/developeronly/algorithms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/developeronly/algorithms/downloads","issues_url":"https://api.github.com/repos/developeronly/algorithms/issues{/number}","pulls_url":"https://api.github.com/repos/developeronly/algorithms/pulls{/number}","milestones_url":"https://api.github.com/repos/developeronly/algorithms/milestones{/number}","notifications_url":"https://api.github.com/repos/developeronly/algorithms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/developeronly/algorithms/labels{/name}","releases_url":"https://api.github.com/repos/developeronly/algorithms/releases{/id}","deployments_url":"https://api.github.com/repos/developeronly/algorithms/deployments","created_at":"2016-11-13T13:05:24Z","updated_at":"2016-11-13T13:05:24Z","pushed_at":"2016-12-18T07:25:38Z","git_url":"git://github.com/developeronly/algorithms.git","ssh_url":"git@github.com:developeronly/algorithms.git","clone_url":"https://github.com/developeronly/algorithms.git","svn_url":"https://github.com/developeronly/algorithms","homepage":null,"size":17,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/developeronly/algorithms/pulls/1"},"html":{"href":"https://github.com/developeronly/algorithms/pull/1"},"issue":{"href":"https://api.github.com/repos/developeronly/algorithms/issues/1"},"comments":{"href":"https://api.github.com/repos/developeronly/algorithms/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/developeronly/algorithms/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/developeronly/algorithms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/developeronly/algorithms/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/developeronly/algorithms/statuses/e44f00d84d4ed16dee85990185f7a66a96ae24be"}}}}
{"actor":{"display_login":"developeronly"}}