{"action":"created","comment":{"url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/pulls/comments/190332423","pull_request_review_id":122682358,"id":190332423,"diff_hunk":"@@ -0,0 +1,95 @@\n+package assignment1;\r\n+\r\n+public class SinglyLinkedList<T> {\r\n+\r\n+\tprivate Node<T> head;\r\n+\r\n+\tpublic Node<T> getHead() {\r\n+\t\treturn head;\r\n+\t}\r\n+\r\n+\tpublic boolean isEmpty() {\r\n+\t\treturn head == null;\r\n+\t}\r\n+\r\n+\t/**\r\n+\t * Finds the kth to last element of the singly linked list\r\n+\t */\r\n+\tpublic T getKthToLastElement(int k) {\r\n+\t\tint length = 0;\r\n+\t\tNode<T> currentNode = getHead();\r\n+\r\n+\t\twhile (currentNode != null) {\r\n+\t\t\tcurrentNode = currentNode.getNext();\r\n+\t\t\tlength++;\r\n+\t\t}\r\n+\r\n+\t\tif (length < k) {\r\n+\t\t\ttry {\r","path":"stelaval/assignment1/SinglyLinkedList.java","position":28,"original_position":28,"commit_id":"0242167f17e46d78aa2310b53f2265a766131079","original_commit_id":"0242167f17e46d78aa2310b53f2265a766131079","user":{"login":"brzozan","id":10895328,"avatar_url":"https://avatars3.githubusercontent.com/u/10895328?v=4","gravatar_id":"","url":"https://api.github.com/users/brzozan","html_url":"https://github.com/brzozan","followers_url":"https://api.github.com/users/brzozan/followers","following_url":"https://api.github.com/users/brzozan/following{/other_user}","gists_url":"https://api.github.com/users/brzozan/gists{/gist_id}","starred_url":"https://api.github.com/users/brzozan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brzozan/subscriptions","organizations_url":"https://api.github.com/users/brzozan/orgs","repos_url":"https://api.github.com/users/brzozan/repos","events_url":"https://api.github.com/users/brzozan/events{/privacy}","received_events_url":"https://api.github.com/users/brzozan/received_events","type":"User","site_admin":false},"body":"No need to catch it here. Either declare exception in the method (`public T getKthToLastElement(int k) throws Exception`) and catch it in `main`, or use exception that inherits from `RuntimeException` which does not need to be declared.\r\n\r\nIn this case the best approach would be to throw `IllegalArgumentException` (it is a `RuntimeException`, so no need to declare it in method).","created_at":"2018-05-23T17:22:22Z","updated_at":"2018-05-23T17:33:50Z","html_url":"https://github.com/flerdacodeu/CodeU-2018-Group10/pull/7#discussion_r190332423","pull_request_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/pulls/7","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/pulls/comments/190332423"},"html":{"href":"https://github.com/flerdacodeu/CodeU-2018-Group10/pull/7#discussion_r190332423"},"pull_request":{"href":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/pulls/7","id":189815777,"html_url":"https://github.com/flerdacodeu/CodeU-2018-Group10/pull/7","diff_url":"https://github.com/flerdacodeu/CodeU-2018-Group10/pull/7.diff","patch_url":"https://github.com/flerdacodeu/CodeU-2018-Group10/pull/7.patch","issue_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/issues/7","number":7,"state":"open","locked":false,"title":"Stelaval Assignment 1","user":{"login":"stelaval","id":33073386,"avatar_url":"https://avatars3.githubusercontent.com/u/33073386?v=4","gravatar_id":"","url":"https://api.github.com/users/stelaval","html_url":"https://github.com/stelaval","followers_url":"https://api.github.com/users/stelaval/followers","following_url":"https://api.github.com/users/stelaval/following{/other_user}","gists_url":"https://api.github.com/users/stelaval/gists{/gist_id}","starred_url":"https://api.github.com/users/stelaval/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stelaval/subscriptions","organizations_url":"https://api.github.com/users/stelaval/orgs","repos_url":"https://api.github.com/users/stelaval/repos","events_url":"https://api.github.com/users/stelaval/events{/privacy}","received_events_url":"https://api.github.com/users/stelaval/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-05-22T23:04:21Z","updated_at":"2018-05-23T17:33:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"defe4032631fd088f158a8ed9b760df30190eb19","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/pulls/7/commits","review_comments_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/pulls/7/comments","review_comment_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/pulls/comments{/number}","comments_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/issues/7/comments","statuses_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/statuses/0242167f17e46d78aa2310b53f2265a766131079","head":{"label":"flerdacodeu:stelaval-1","ref":"stelaval-1","sha":"0242167f17e46d78aa2310b53f2265a766131079","user":{"login":"flerdacodeu","id":28591648,"avatar_url":"https://avatars2.githubusercontent.com/u/28591648?v=4","gravatar_id":"","url":"https://api.github.com/users/flerdacodeu","html_url":"https://github.com/flerdacodeu","followers_url":"https://api.github.com/users/flerdacodeu/followers","following_url":"https://api.github.com/users/flerdacodeu/following{/other_user}","gists_url":"https://api.github.com/users/flerdacodeu/gists{/gist_id}","starred_url":"https://api.github.com/users/flerdacodeu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flerdacodeu/subscriptions","organizations_url":"https://api.github.com/users/flerdacodeu/orgs","repos_url":"https://api.github.com/users/flerdacodeu/repos","events_url":"https://api.github.com/users/flerdacodeu/events{/privacy}","received_events_url":"https://api.github.com/users/flerdacodeu/received_events","type":"User","site_admin":false},"repo":{"id":133326681,"name":"CodeU-2018-Group10","full_name":"flerdacodeu/CodeU-2018-Group10","owner":{"login":"flerdacodeu","id":28591648,"avatar_url":"https://avatars2.githubusercontent.com/u/28591648?v=4","gravatar_id":"","url":"https://api.github.com/users/flerdacodeu","html_url":"https://github.com/flerdacodeu","followers_url":"https://api.github.com/users/flerdacodeu/followers","following_url":"https://api.github.com/users/flerdacodeu/following{/other_user}","gists_url":"https://api.github.com/users/flerdacodeu/gists{/gist_id}","starred_url":"https://api.github.com/users/flerdacodeu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flerdacodeu/subscriptions","organizations_url":"https://api.github.com/users/flerdacodeu/orgs","repos_url":"https://api.github.com/users/flerdacodeu/repos","events_url":"https://api.github.com/users/flerdacodeu/events{/privacy}","received_events_url":"https://api.github.com/users/flerdacodeu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/flerdacodeu/CodeU-2018-Group10","description":null,"fork":false,"url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10","forks_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/forks","keys_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/teams","hooks_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/hooks","issue_events_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/issues/events{/number}","events_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/events","assignees_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/assignees{/user}","branches_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/branches{/branch}","tags_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/tags","blobs_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/git/refs{/sha}","trees_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/statuses/{sha}","languages_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/languages","stargazers_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/stargazers","contributors_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/contributors","subscribers_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/subscribers","subscription_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/subscription","commits_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/commits{/sha}","git_commits_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/git/commits{/sha}","comments_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/comments{/number}","issue_comment_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/issues/comments{/number}","contents_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/contents/{+path}","compare_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/merges","archive_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/downloads","issues_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/issues{/number}","pulls_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/pulls{/number}","milestones_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/milestones{/number}","notifications_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/labels{/name}","releases_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/releases{/id}","deployments_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/deployments","created_at":"2018-05-14T08:07:24Z","updated_at":"2018-05-17T16:46:17Z","pushed_at":"2018-05-22T23:44:57Z","git_url":"git://github.com/flerdacodeu/CodeU-2018-Group10.git","ssh_url":"git@github.com:flerdacodeu/CodeU-2018-Group10.git","clone_url":"https://github.com/flerdacodeu/CodeU-2018-Group10.git","svn_url":"https://github.com/flerdacodeu/CodeU-2018-Group10","homepage":null,"size":37,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":5,"license":null,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"base":{"label":"flerdacodeu:master","ref":"master","sha":"f037e974e3fee42ac28c593258f68e4eb69e4d36","user":{"login":"flerdacodeu","id":28591648,"avatar_url":"https://avatars2.githubusercontent.com/u/28591648?v=4","gravatar_id":"","url":"https://api.github.com/users/flerdacodeu","html_url":"https://github.com/flerdacodeu","followers_url":"https://api.github.com/users/flerdacodeu/followers","following_url":"https://api.github.com/users/flerdacodeu/following{/other_user}","gists_url":"https://api.github.com/users/flerdacodeu/gists{/gist_id}","starred_url":"https://api.github.com/users/flerdacodeu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flerdacodeu/subscriptions","organizations_url":"https://api.github.com/users/flerdacodeu/orgs","repos_url":"https://api.github.com/users/flerdacodeu/repos","events_url":"https://api.github.com/users/flerdacodeu/events{/privacy}","received_events_url":"https://api.github.com/users/flerdacodeu/received_events","type":"User","site_admin":false},"repo":{"id":133326681,"name":"CodeU-2018-Group10","full_name":"flerdacodeu/CodeU-2018-Group10","owner":{"login":"flerdacodeu","id":28591648,"avatar_url":"https://avatars2.githubusercontent.com/u/28591648?v=4","gravatar_id":"","url":"https://api.github.com/users/flerdacodeu","html_url":"https://github.com/flerdacodeu","followers_url":"https://api.github.com/users/flerdacodeu/followers","following_url":"https://api.github.com/users/flerdacodeu/following{/other_user}","gists_url":"https://api.github.com/users/flerdacodeu/gists{/gist_id}","starred_url":"https://api.github.com/users/flerdacodeu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flerdacodeu/subscriptions","organizations_url":"https://api.github.com/users/flerdacodeu/orgs","repos_url":"https://api.github.com/users/flerdacodeu/repos","events_url":"https://api.github.com/users/flerdacodeu/events{/privacy}","received_events_url":"https://api.github.com/users/flerdacodeu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/flerdacodeu/CodeU-2018-Group10","description":null,"fork":false,"url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10","forks_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/forks","keys_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/teams","hooks_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/hooks","issue_events_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/issues/events{/number}","events_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/events","assignees_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/assignees{/user}","branches_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/branches{/branch}","tags_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/tags","blobs_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/git/refs{/sha}","trees_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/statuses/{sha}","languages_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/languages","stargazers_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/stargazers","contributors_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/contributors","subscribers_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/subscribers","subscription_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/subscription","commits_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/commits{/sha}","git_commits_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/git/commits{/sha}","comments_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/comments{/number}","issue_comment_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/issues/comments{/number}","contents_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/contents/{+path}","compare_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/merges","archive_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/downloads","issues_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/issues{/number}","pulls_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/pulls{/number}","milestones_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/milestones{/number}","notifications_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/labels{/name}","releases_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/releases{/id}","deployments_url":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/deployments","created_at":"2018-05-14T08:07:24Z","updated_at":"2018-05-17T16:46:17Z","pushed_at":"2018-05-22T23:44:57Z","git_url":"git://github.com/flerdacodeu/CodeU-2018-Group10.git","ssh_url":"git@github.com:flerdacodeu/CodeU-2018-Group10.git","clone_url":"https://github.com/flerdacodeu/CodeU-2018-Group10.git","svn_url":"https://github.com/flerdacodeu/CodeU-2018-Group10","homepage":null,"size":37,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":5,"license":null,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/pulls/7"},"html":{"href":"https://github.com/flerdacodeu/CodeU-2018-Group10/pull/7"},"issue":{"href":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/issues/7"},"comments":{"href":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/flerdacodeu/CodeU-2018-Group10/statuses/0242167f17e46d78aa2310b53f2265a766131079"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"brzozan"}}