{"action":"created","comment":{"url":"https://api.github.com/repos/Ada-C12/linked-lists/pulls/comments/359155850","pull_request_review_id":333733524,"id":359155850,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM1OTE1NTg1MA==","diff_hunk":"@@ -2,44 +2,82 @@\n \n class LinkedList\n   attr_reader :head\n-\n+  \n   def initialize\n     @head = nil\n   end\n-\n-  # Time complexity - ?\n-  # Space complexity - ?\n+  \n+  # Time complexity - O(1)\n+  # Space complexity - O(1)\n   def add_first(data)\n-\n+    @head = Node.new(data, head)\n   end\n-\n-  # Time complexity - ?\n-  # Space complexity - ?\n+  \n+  # Time complexity - O(1); since we store the first node as 'head' we can access it in O(1) time.\n+  # Space complexity - O(1); We are not using addition storage to retrieve and return the first node.\n   def get_first","path":"lib/linked_list.rb","position":25,"original_position":25,"commit_id":"1236d1805b5a4557beb3b315e154c4d996e830f8","original_commit_id":"1236d1805b5a4557beb3b315e154c4d996e830f8","user":{"login":"CheezItMan","id":1177416,"node_id":"MDQ6VXNlcjExNzc0MTY=","avatar_url":"https://avatars3.githubusercontent.com/u/1177416?v=4","gravatar_id":"","url":"https://api.github.com/users/CheezItMan","html_url":"https://github.com/CheezItMan","followers_url":"https://api.github.com/users/CheezItMan/followers","following_url":"https://api.github.com/users/CheezItMan/following{/other_user}","gists_url":"https://api.github.com/users/CheezItMan/gists{/gist_id}","starred_url":"https://api.github.com/users/CheezItMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CheezItMan/subscriptions","organizations_url":"https://api.github.com/users/CheezItMan/orgs","repos_url":"https://api.github.com/users/CheezItMan/repos","events_url":"https://api.github.com/users/CheezItMan/events{/privacy}","received_events_url":"https://api.github.com/users/CheezItMan/received_events","type":"User","site_admin":false},"body":"👍 ","created_at":"2019-12-18T05:17:04Z","updated_at":"2019-12-18T05:18:41Z","html_url":"https://github.com/Ada-C12/linked-lists/pull/16#discussion_r359155850","pull_request_url":"https://api.github.com/repos/Ada-C12/linked-lists/pulls/16","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/Ada-C12/linked-lists/pulls/comments/359155850"},"html":{"href":"https://github.com/Ada-C12/linked-lists/pull/16#discussion_r359155850"},"pull_request":{"href":"https://api.github.com/repos/Ada-C12/linked-lists/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/Ada-C12/linked-lists/pulls/16","id":348940213,"node_id":"MDExOlB1bGxSZXF1ZXN0MzQ4OTQwMjEz","html_url":"https://github.com/Ada-C12/linked-lists/pull/16","diff_url":"https://github.com/Ada-C12/linked-lists/pull/16.diff","patch_url":"https://github.com/Ada-C12/linked-lists/pull/16.patch","issue_url":"https://api.github.com/repos/Ada-C12/linked-lists/issues/16","number":16,"state":"open","locked":false,"title":"Completed assignment.","user":{"login":"idhallie","id":34145475,"node_id":"MDQ6VXNlcjM0MTQ1NDc1","avatar_url":"https://avatars3.githubusercontent.com/u/34145475?v=4","gravatar_id":"","url":"https://api.github.com/users/idhallie","html_url":"https://github.com/idhallie","followers_url":"https://api.github.com/users/idhallie/followers","following_url":"https://api.github.com/users/idhallie/following{/other_user}","gists_url":"https://api.github.com/users/idhallie/gists{/gist_id}","starred_url":"https://api.github.com/users/idhallie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/idhallie/subscriptions","organizations_url":"https://api.github.com/users/idhallie/orgs","repos_url":"https://api.github.com/users/idhallie/repos","events_url":"https://api.github.com/users/idhallie/events{/privacy}","received_events_url":"https://api.github.com/users/idhallie/received_events","type":"User","site_admin":false},"body":"# Linked List Comprehension Questions\r\n\r\n| Question \t| Response \t|\r\n|---\t|---\t|\r\n| 1.  What advantages does a LinkedList have over an Array? \t|  Insertions and deletions are faster because Linked Lists do not require contiguous memory. When inserting/deleting with an array, all of the elements after the point of change must shift. Additionally, since a memory block does not need to be allocated up-front for a Linked List, it expands in size very easily.\t|\r\n| 2.  When is an Array more advantageous? \t|  Arrays are better for random access since we can access a specified element in O(1) time with its index. With a Linked List, we have to traverse the list to find a particular element. \t|\r\n| 3.  When is an Array more advantageous? \t|  This question appears to be duplicated. If it was intended to be Linked List advantages, I've mentioned those in question 1. \t|\r\n\r\n","created_at":"2019-12-04T15:12:02Z","updated_at":"2019-12-18T05:18:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9508f6baeed6929c1ed3ca60645eca51dd51deab","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Ada-C12/linked-lists/pulls/16/commits","review_comments_url":"https://api.github.com/repos/Ada-C12/linked-lists/pulls/16/comments","review_comment_url":"https://api.github.com/repos/Ada-C12/linked-lists/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Ada-C12/linked-lists/issues/16/comments","statuses_url":"https://api.github.com/repos/Ada-C12/linked-lists/statuses/1236d1805b5a4557beb3b315e154c4d996e830f8","head":{"label":"idhallie:master","ref":"master","sha":"1236d1805b5a4557beb3b315e154c4d996e830f8","user":{"login":"idhallie","id":34145475,"node_id":"MDQ6VXNlcjM0MTQ1NDc1","avatar_url":"https://avatars3.githubusercontent.com/u/34145475?v=4","gravatar_id":"","url":"https://api.github.com/users/idhallie","html_url":"https://github.com/idhallie","followers_url":"https://api.github.com/users/idhallie/followers","following_url":"https://api.github.com/users/idhallie/following{/other_user}","gists_url":"https://api.github.com/users/idhallie/gists{/gist_id}","starred_url":"https://api.github.com/users/idhallie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/idhallie/subscriptions","organizations_url":"https://api.github.com/users/idhallie/orgs","repos_url":"https://api.github.com/users/idhallie/repos","events_url":"https://api.github.com/users/idhallie/events{/privacy}","received_events_url":"https://api.github.com/users/idhallie/received_events","type":"User","site_admin":false},"repo":{"id":223259411,"node_id":"MDEwOlJlcG9zaXRvcnkyMjMyNTk0MTE=","name":"linked-lists","full_name":"idhallie/linked-lists","private":false,"owner":{"login":"idhallie","id":34145475,"node_id":"MDQ6VXNlcjM0MTQ1NDc1","avatar_url":"https://avatars3.githubusercontent.com/u/34145475?v=4","gravatar_id":"","url":"https://api.github.com/users/idhallie","html_url":"https://github.com/idhallie","followers_url":"https://api.github.com/users/idhallie/followers","following_url":"https://api.github.com/users/idhallie/following{/other_user}","gists_url":"https://api.github.com/users/idhallie/gists{/gist_id}","starred_url":"https://api.github.com/users/idhallie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/idhallie/subscriptions","organizations_url":"https://api.github.com/users/idhallie/orgs","repos_url":"https://api.github.com/users/idhallie/repos","events_url":"https://api.github.com/users/idhallie/events{/privacy}","received_events_url":"https://api.github.com/users/idhallie/received_events","type":"User","site_admin":false},"html_url":"https://github.com/idhallie/linked-lists","description":null,"fork":true,"url":"https://api.github.com/repos/idhallie/linked-lists","forks_url":"https://api.github.com/repos/idhallie/linked-lists/forks","keys_url":"https://api.github.com/repos/idhallie/linked-lists/keys{/key_id}","collaborators_url":"https://api.github.com/repos/idhallie/linked-lists/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/idhallie/linked-lists/teams","hooks_url":"https://api.github.com/repos/idhallie/linked-lists/hooks","issue_events_url":"https://api.github.com/repos/idhallie/linked-lists/issues/events{/number}","events_url":"https://api.github.com/repos/idhallie/linked-lists/events","assignees_url":"https://api.github.com/repos/idhallie/linked-lists/assignees{/user}","branches_url":"https://api.github.com/repos/idhallie/linked-lists/branches{/branch}","tags_url":"https://api.github.com/repos/idhallie/linked-lists/tags","blobs_url":"https://api.github.com/repos/idhallie/linked-lists/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/idhallie/linked-lists/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/idhallie/linked-lists/git/refs{/sha}","trees_url":"https://api.github.com/repos/idhallie/linked-lists/git/trees{/sha}","statuses_url":"https://api.github.com/repos/idhallie/linked-lists/statuses/{sha}","languages_url":"https://api.github.com/repos/idhallie/linked-lists/languages","stargazers_url":"https://api.github.com/repos/idhallie/linked-lists/stargazers","contributors_url":"https://api.github.com/repos/idhallie/linked-lists/contributors","subscribers_url":"https://api.github.com/repos/idhallie/linked-lists/subscribers","subscription_url":"https://api.github.com/repos/idhallie/linked-lists/subscription","commits_url":"https://api.github.com/repos/idhallie/linked-lists/commits{/sha}","git_commits_url":"https://api.github.com/repos/idhallie/linked-lists/git/commits{/sha}","comments_url":"https://api.github.com/repos/idhallie/linked-lists/comments{/number}","issue_comment_url":"https://api.github.com/repos/idhallie/linked-lists/issues/comments{/number}","contents_url":"https://api.github.com/repos/idhallie/linked-lists/contents/{+path}","compare_url":"https://api.github.com/repos/idhallie/linked-lists/compare/{base}...{head}","merges_url":"https://api.github.com/repos/idhallie/linked-lists/merges","archive_url":"https://api.github.com/repos/idhallie/linked-lists/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/idhallie/linked-lists/downloads","issues_url":"https://api.github.com/repos/idhallie/linked-lists/issues{/number}","pulls_url":"https://api.github.com/repos/idhallie/linked-lists/pulls{/number}","milestones_url":"https://api.github.com/repos/idhallie/linked-lists/milestones{/number}","notifications_url":"https://api.github.com/repos/idhallie/linked-lists/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/idhallie/linked-lists/labels{/name}","releases_url":"https://api.github.com/repos/idhallie/linked-lists/releases{/id}","deployments_url":"https://api.github.com/repos/idhallie/linked-lists/deployments","created_at":"2019-11-21T20:27:48Z","updated_at":"2019-12-04T15:03:44Z","pushed_at":"2019-12-04T15:03:42Z","git_url":"git://github.com/idhallie/linked-lists.git","ssh_url":"git@github.com:idhallie/linked-lists.git","clone_url":"https://github.com/idhallie/linked-lists.git","svn_url":"https://github.com/idhallie/linked-lists","homepage":null,"size":27,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Ada-C12:master","ref":"master","sha":"1f65bfa3b9056edad8cc5799e8df40bff8257ddb","user":{"login":"Ada-C12","id":50816531,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUwODE2NTMx","avatar_url":"https://avatars1.githubusercontent.com/u/50816531?v=4","gravatar_id":"","url":"https://api.github.com/users/Ada-C12","html_url":"https://github.com/Ada-C12","followers_url":"https://api.github.com/users/Ada-C12/followers","following_url":"https://api.github.com/users/Ada-C12/following{/other_user}","gists_url":"https://api.github.com/users/Ada-C12/gists{/gist_id}","starred_url":"https://api.github.com/users/Ada-C12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ada-C12/subscriptions","organizations_url":"https://api.github.com/users/Ada-C12/orgs","repos_url":"https://api.github.com/users/Ada-C12/repos","events_url":"https://api.github.com/users/Ada-C12/events{/privacy}","received_events_url":"https://api.github.com/users/Ada-C12/received_events","type":"Organization","site_admin":false},"repo":{"id":222521566,"node_id":"MDEwOlJlcG9zaXRvcnkyMjI1MjE1NjY=","name":"linked-lists","full_name":"Ada-C12/linked-lists","private":false,"owner":{"login":"Ada-C12","id":50816531,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUwODE2NTMx","avatar_url":"https://avatars1.githubusercontent.com/u/50816531?v=4","gravatar_id":"","url":"https://api.github.com/users/Ada-C12","html_url":"https://github.com/Ada-C12","followers_url":"https://api.github.com/users/Ada-C12/followers","following_url":"https://api.github.com/users/Ada-C12/following{/other_user}","gists_url":"https://api.github.com/users/Ada-C12/gists{/gist_id}","starred_url":"https://api.github.com/users/Ada-C12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ada-C12/subscriptions","organizations_url":"https://api.github.com/users/Ada-C12/orgs","repos_url":"https://api.github.com/users/Ada-C12/repos","events_url":"https://api.github.com/users/Ada-C12/events{/privacy}","received_events_url":"https://api.github.com/users/Ada-C12/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Ada-C12/linked-lists","description":null,"fork":true,"url":"https://api.github.com/repos/Ada-C12/linked-lists","forks_url":"https://api.github.com/repos/Ada-C12/linked-lists/forks","keys_url":"https://api.github.com/repos/Ada-C12/linked-lists/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ada-C12/linked-lists/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ada-C12/linked-lists/teams","hooks_url":"https://api.github.com/repos/Ada-C12/linked-lists/hooks","issue_events_url":"https://api.github.com/repos/Ada-C12/linked-lists/issues/events{/number}","events_url":"https://api.github.com/repos/Ada-C12/linked-lists/events","assignees_url":"https://api.github.com/repos/Ada-C12/linked-lists/assignees{/user}","branches_url":"https://api.github.com/repos/Ada-C12/linked-lists/branches{/branch}","tags_url":"https://api.github.com/repos/Ada-C12/linked-lists/tags","blobs_url":"https://api.github.com/repos/Ada-C12/linked-lists/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ada-C12/linked-lists/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ada-C12/linked-lists/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ada-C12/linked-lists/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ada-C12/linked-lists/statuses/{sha}","languages_url":"https://api.github.com/repos/Ada-C12/linked-lists/languages","stargazers_url":"https://api.github.com/repos/Ada-C12/linked-lists/stargazers","contributors_url":"https://api.github.com/repos/Ada-C12/linked-lists/contributors","subscribers_url":"https://api.github.com/repos/Ada-C12/linked-lists/subscribers","subscription_url":"https://api.github.com/repos/Ada-C12/linked-lists/subscription","commits_url":"https://api.github.com/repos/Ada-C12/linked-lists/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ada-C12/linked-lists/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ada-C12/linked-lists/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ada-C12/linked-lists/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ada-C12/linked-lists/contents/{+path}","compare_url":"https://api.github.com/repos/Ada-C12/linked-lists/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ada-C12/linked-lists/merges","archive_url":"https://api.github.com/repos/Ada-C12/linked-lists/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ada-C12/linked-lists/downloads","issues_url":"https://api.github.com/repos/Ada-C12/linked-lists/issues{/number}","pulls_url":"https://api.github.com/repos/Ada-C12/linked-lists/pulls{/number}","milestones_url":"https://api.github.com/repos/Ada-C12/linked-lists/milestones{/number}","notifications_url":"https://api.github.com/repos/Ada-C12/linked-lists/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ada-C12/linked-lists/labels{/name}","releases_url":"https://api.github.com/repos/Ada-C12/linked-lists/releases{/id}","deployments_url":"https://api.github.com/repos/Ada-C12/linked-lists/deployments","created_at":"2019-11-18T18:56:25Z","updated_at":"2019-11-18T18:56:26Z","pushed_at":"2019-12-11T03:48:51Z","git_url":"git://github.com/Ada-C12/linked-lists.git","ssh_url":"git@github.com:Ada-C12/linked-lists.git","clone_url":"https://github.com/Ada-C12/linked-lists.git","svn_url":"https://github.com/Ada-C12/linked-lists","homepage":null,"size":26,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":47,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":42,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":47,"open_issues":42,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Ada-C12/linked-lists/pulls/16"},"html":{"href":"https://github.com/Ada-C12/linked-lists/pull/16"},"issue":{"href":"https://api.github.com/repos/Ada-C12/linked-lists/issues/16"},"comments":{"href":"https://api.github.com/repos/Ada-C12/linked-lists/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/Ada-C12/linked-lists/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/Ada-C12/linked-lists/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Ada-C12/linked-lists/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/Ada-C12/linked-lists/statuses/1236d1805b5a4557beb3b315e154c4d996e830f8"}},"author_association":"NONE"}}
{"actor":{"display_login":"CheezItMan"}}