{"action":"created","comment":{"url":"https://api.github.com/repos/CPRF-Session2/Assignment9/pulls/comments/74360411","id":74360411,"diff_hunk":"@@ -0,0 +1,162 @@\n+/*Jinoo Hong*/\n+/*Write a program linkedlist.c creating a node structure as described in class. Implement the following functions for integers:\n+\tprintList(): given a linked list, print out the list\n+\tadd(): given a linked list and an integer, add a node with the integer to the beginning of the list.\n+\tremove(): given a linked list and an integer, remove the first instance of that integer in the list. Print an error message if the integer is not found.\n+\tclear(): given a linked list, empty the entire linked list (delete all nodes).\n+\tsmallestLength(): Given two linked lists of integers, write a function to find the length of the smallest list.\n+\tsmallestSum():Given two linked lists of integers, write a function to find the list with the smallest sum.*/\n+\n+#include<stdio.h>\n+#include<stdlib.h>\n+\n+\n+struct node {\n+\tint data;\n+\tstruct node *next;\n+};\n+\n+\n+//creating a linked list\n+void insert(struct node *pointer, int data) {\n+\twhile(pointer->next!=NULL) {\n+\t\tpointer = pointer -> next;\n+\t}\n+\tpointer->next = (struct node *)malloc(sizeof(struct node));\n+\tpointer = pointer->next;\n+\tpointer->data = data;\n+\tpointer->next = NULL;\n+}\n+\n+\n+//printing the list\n+void printList(struct node *pointer) {\n+\tprintf(\"List: \");\n+\tpointer = pointer->next;\n+\twhile(pointer->next!=NULL) {\n+\t\tprintf(\"%d \",pointer->data);\n+\t\tpointer = pointer->next;\n+\t}\n+\tprintf(\"\\n\");\n+}\n+\n+\n+//adding to the front of the list\n+void addingtofront(struct node *head, int data) {\n+\tstruct node *new;\n+\tnew=(struct node *) malloc (sizeof(struct node));\n+\tnew->next=head->next;\n+\thead->next=new;\n+\tnew->data=data;\n+\tprintList(head);\n+}\n+\n+//deleting an 18\n+void delete(struct node *pointer, int numbertofind) {\n+\tstruct node *head = pointer;\n+\tint end = 0;\n+\twhile(pointer->next->data!=numbertofind) {\n+\t\tpointer=pointer->next;\n+\t\tif (pointer->next==NULL){\n+\t\t\tprintf(\"Number not found in list\\n\");\n+\t\t\tend = 1;\n+\t\t}\n+\t}\n+\tif (end==0) {\n+\t\tstruct node *temp;\n+\t\ttemp = pointer->next;\n+\t\tpointer->next=pointer->next->next;\n+\t\tfree(temp);\n+\t\tprintList(head);\n+\t}\n+}\n+\n+//clearing/freeing the list\n+void clear (struct node *pointer) {\n+\tstruct node *temp;\n+\twhile (pointer->next!=NULL) {\n+\t\ttemp = pointer;\n+\t\tfree(pointer);\n+\t\tpointer=temp;\n+\t\tpointer=pointer->next;\n+\t}\n+\t\tprintf(\"The list has been cleared\\n\");\n+}\n+\n+int findsmaller(struct node *pointer1, struct node *pointer2) {","path":"linkedlist.c","position":86,"original_position":86,"commit_id":"575b34b4e01290db2007f430bdad4edab69d720e","original_commit_id":"575b34b4e01290db2007f430bdad4edab69d720e","user":{"login":"lesley2958","id":9807841,"avatar_url":"https://avatars.githubusercontent.com/u/9807841?v=3","gravatar_id":"","url":"https://api.github.com/users/lesley2958","html_url":"https://github.com/lesley2958","followers_url":"https://api.github.com/users/lesley2958/followers","following_url":"https://api.github.com/users/lesley2958/following{/other_user}","gists_url":"https://api.github.com/users/lesley2958/gists{/gist_id}","starred_url":"https://api.github.com/users/lesley2958/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lesley2958/subscriptions","organizations_url":"https://api.github.com/users/lesley2958/orgs","repos_url":"https://api.github.com/users/lesley2958/repos","events_url":"https://api.github.com/users/lesley2958/events{/privacy}","received_events_url":"https://api.github.com/users/lesley2958/received_events","type":"User","site_admin":false},"body":"this should have returned the smaller list instead!","created_at":"2016-08-11T01:44:14Z","updated_at":"2016-08-11T01:44:14Z","html_url":"https://github.com/CPRF-Session2/Assignment9/pull/9#discussion_r74360411","pull_request_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/CPRF-Session2/Assignment9/pulls/comments/74360411"},"html":{"href":"https://github.com/CPRF-Session2/Assignment9/pull/9#discussion_r74360411"},"pull_request":{"href":"https://api.github.com/repos/CPRF-Session2/Assignment9/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/CPRF-Session2/Assignment9/pulls/9","id":80250339,"html_url":"https://github.com/CPRF-Session2/Assignment9/pull/9","diff_url":"https://github.com/CPRF-Session2/Assignment9/pull/9.diff","patch_url":"https://github.com/CPRF-Session2/Assignment9/pull/9.patch","issue_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/issues/9","number":9,"state":"open","locked":false,"title":"assignment 9","user":{"login":"jinoohong2190","id":20544103,"avatar_url":"https://avatars.githubusercontent.com/u/20544103?v=3","gravatar_id":"","url":"https://api.github.com/users/jinoohong2190","html_url":"https://github.com/jinoohong2190","followers_url":"https://api.github.com/users/jinoohong2190/followers","following_url":"https://api.github.com/users/jinoohong2190/following{/other_user}","gists_url":"https://api.github.com/users/jinoohong2190/gists{/gist_id}","starred_url":"https://api.github.com/users/jinoohong2190/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jinoohong2190/subscriptions","organizations_url":"https://api.github.com/users/jinoohong2190/orgs","repos_url":"https://api.github.com/users/jinoohong2190/repos","events_url":"https://api.github.com/users/jinoohong2190/events{/privacy}","received_events_url":"https://api.github.com/users/jinoohong2190/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-05T14:16:31Z","updated_at":"2016-08-11T01:44:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2257e556c551481be4d2557e5696402a7ba650e8","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/pulls/9/commits","review_comments_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/pulls/9/comments","review_comment_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/issues/9/comments","statuses_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/statuses/575b34b4e01290db2007f430bdad4edab69d720e","head":{"label":"jinoohong2190:master","ref":"master","sha":"575b34b4e01290db2007f430bdad4edab69d720e","user":{"login":"jinoohong2190","id":20544103,"avatar_url":"https://avatars.githubusercontent.com/u/20544103?v=3","gravatar_id":"","url":"https://api.github.com/users/jinoohong2190","html_url":"https://github.com/jinoohong2190","followers_url":"https://api.github.com/users/jinoohong2190/followers","following_url":"https://api.github.com/users/jinoohong2190/following{/other_user}","gists_url":"https://api.github.com/users/jinoohong2190/gists{/gist_id}","starred_url":"https://api.github.com/users/jinoohong2190/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jinoohong2190/subscriptions","organizations_url":"https://api.github.com/users/jinoohong2190/orgs","repos_url":"https://api.github.com/users/jinoohong2190/repos","events_url":"https://api.github.com/users/jinoohong2190/events{/privacy}","received_events_url":"https://api.github.com/users/jinoohong2190/received_events","type":"User","site_admin":false},"repo":{"id":64945653,"name":"Assignment9","full_name":"jinoohong2190/Assignment9","owner":{"login":"jinoohong2190","id":20544103,"avatar_url":"https://avatars.githubusercontent.com/u/20544103?v=3","gravatar_id":"","url":"https://api.github.com/users/jinoohong2190","html_url":"https://github.com/jinoohong2190","followers_url":"https://api.github.com/users/jinoohong2190/followers","following_url":"https://api.github.com/users/jinoohong2190/following{/other_user}","gists_url":"https://api.github.com/users/jinoohong2190/gists{/gist_id}","starred_url":"https://api.github.com/users/jinoohong2190/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jinoohong2190/subscriptions","organizations_url":"https://api.github.com/users/jinoohong2190/orgs","repos_url":"https://api.github.com/users/jinoohong2190/repos","events_url":"https://api.github.com/users/jinoohong2190/events{/privacy}","received_events_url":"https://api.github.com/users/jinoohong2190/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jinoohong2190/Assignment9","description":"Assignment 9","fork":true,"url":"https://api.github.com/repos/jinoohong2190/Assignment9","forks_url":"https://api.github.com/repos/jinoohong2190/Assignment9/forks","keys_url":"https://api.github.com/repos/jinoohong2190/Assignment9/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jinoohong2190/Assignment9/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jinoohong2190/Assignment9/teams","hooks_url":"https://api.github.com/repos/jinoohong2190/Assignment9/hooks","issue_events_url":"https://api.github.com/repos/jinoohong2190/Assignment9/issues/events{/number}","events_url":"https://api.github.com/repos/jinoohong2190/Assignment9/events","assignees_url":"https://api.github.com/repos/jinoohong2190/Assignment9/assignees{/user}","branches_url":"https://api.github.com/repos/jinoohong2190/Assignment9/branches{/branch}","tags_url":"https://api.github.com/repos/jinoohong2190/Assignment9/tags","blobs_url":"https://api.github.com/repos/jinoohong2190/Assignment9/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jinoohong2190/Assignment9/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jinoohong2190/Assignment9/git/refs{/sha}","trees_url":"https://api.github.com/repos/jinoohong2190/Assignment9/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jinoohong2190/Assignment9/statuses/{sha}","languages_url":"https://api.github.com/repos/jinoohong2190/Assignment9/languages","stargazers_url":"https://api.github.com/repos/jinoohong2190/Assignment9/stargazers","contributors_url":"https://api.github.com/repos/jinoohong2190/Assignment9/contributors","subscribers_url":"https://api.github.com/repos/jinoohong2190/Assignment9/subscribers","subscription_url":"https://api.github.com/repos/jinoohong2190/Assignment9/subscription","commits_url":"https://api.github.com/repos/jinoohong2190/Assignment9/commits{/sha}","git_commits_url":"https://api.github.com/repos/jinoohong2190/Assignment9/git/commits{/sha}","comments_url":"https://api.github.com/repos/jinoohong2190/Assignment9/comments{/number}","issue_comment_url":"https://api.github.com/repos/jinoohong2190/Assignment9/issues/comments{/number}","contents_url":"https://api.github.com/repos/jinoohong2190/Assignment9/contents/{+path}","compare_url":"https://api.github.com/repos/jinoohong2190/Assignment9/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jinoohong2190/Assignment9/merges","archive_url":"https://api.github.com/repos/jinoohong2190/Assignment9/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jinoohong2190/Assignment9/downloads","issues_url":"https://api.github.com/repos/jinoohong2190/Assignment9/issues{/number}","pulls_url":"https://api.github.com/repos/jinoohong2190/Assignment9/pulls{/number}","milestones_url":"https://api.github.com/repos/jinoohong2190/Assignment9/milestones{/number}","notifications_url":"https://api.github.com/repos/jinoohong2190/Assignment9/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jinoohong2190/Assignment9/labels{/name}","releases_url":"https://api.github.com/repos/jinoohong2190/Assignment9/releases{/id}","deployments_url":"https://api.github.com/repos/jinoohong2190/Assignment9/deployments","created_at":"2016-08-04T15:23:59Z","updated_at":"2016-08-05T14:15:53Z","pushed_at":"2016-08-05T14:15:52Z","git_url":"git://github.com/jinoohong2190/Assignment9.git","ssh_url":"git@github.com:jinoohong2190/Assignment9.git","clone_url":"https://github.com/jinoohong2190/Assignment9.git","svn_url":"https://github.com/jinoohong2190/Assignment9","homepage":null,"size":3,"stargazers_count":0,"watchers_count":0,"language":"C","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":"CPRF-Session2:master","ref":"master","sha":"cae7665be4c9b3cb724ec3eaf400732ed1f4dd28","user":{"login":"CPRF-Session2","id":20541204,"avatar_url":"https://avatars.githubusercontent.com/u/20541204?v=3","gravatar_id":"","url":"https://api.github.com/users/CPRF-Session2","html_url":"https://github.com/CPRF-Session2","followers_url":"https://api.github.com/users/CPRF-Session2/followers","following_url":"https://api.github.com/users/CPRF-Session2/following{/other_user}","gists_url":"https://api.github.com/users/CPRF-Session2/gists{/gist_id}","starred_url":"https://api.github.com/users/CPRF-Session2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CPRF-Session2/subscriptions","organizations_url":"https://api.github.com/users/CPRF-Session2/orgs","repos_url":"https://api.github.com/users/CPRF-Session2/repos","events_url":"https://api.github.com/users/CPRF-Session2/events{/privacy}","received_events_url":"https://api.github.com/users/CPRF-Session2/received_events","type":"Organization","site_admin":false},"repo":{"id":64940293,"name":"Assignment9","full_name":"CPRF-Session2/Assignment9","owner":{"login":"CPRF-Session2","id":20541204,"avatar_url":"https://avatars.githubusercontent.com/u/20541204?v=3","gravatar_id":"","url":"https://api.github.com/users/CPRF-Session2","html_url":"https://github.com/CPRF-Session2","followers_url":"https://api.github.com/users/CPRF-Session2/followers","following_url":"https://api.github.com/users/CPRF-Session2/following{/other_user}","gists_url":"https://api.github.com/users/CPRF-Session2/gists{/gist_id}","starred_url":"https://api.github.com/users/CPRF-Session2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CPRF-Session2/subscriptions","organizations_url":"https://api.github.com/users/CPRF-Session2/orgs","repos_url":"https://api.github.com/users/CPRF-Session2/repos","events_url":"https://api.github.com/users/CPRF-Session2/events{/privacy}","received_events_url":"https://api.github.com/users/CPRF-Session2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CPRF-Session2/Assignment9","description":"Assignment 9","fork":false,"url":"https://api.github.com/repos/CPRF-Session2/Assignment9","forks_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/forks","keys_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/teams","hooks_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/hooks","issue_events_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/issues/events{/number}","events_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/events","assignees_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/assignees{/user}","branches_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/branches{/branch}","tags_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/tags","blobs_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/git/refs{/sha}","trees_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/statuses/{sha}","languages_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/languages","stargazers_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/stargazers","contributors_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/contributors","subscribers_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/subscribers","subscription_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/subscription","commits_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/commits{/sha}","git_commits_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/git/commits{/sha}","comments_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/comments{/number}","issue_comment_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/issues/comments{/number}","contents_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/contents/{+path}","compare_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/merges","archive_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/downloads","issues_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/issues{/number}","pulls_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/pulls{/number}","milestones_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/milestones{/number}","notifications_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/labels{/name}","releases_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/releases{/id}","deployments_url":"https://api.github.com/repos/CPRF-Session2/Assignment9/deployments","created_at":"2016-08-04T14:13:39Z","updated_at":"2016-08-04T14:13:39Z","pushed_at":"2016-08-05T14:51:52Z","git_url":"git://github.com/CPRF-Session2/Assignment9.git","ssh_url":"git@github.com:CPRF-Session2/Assignment9.git","clone_url":"https://github.com/CPRF-Session2/Assignment9.git","svn_url":"https://github.com/CPRF-Session2/Assignment9","homepage":null,"size":1,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":13,"forks":15,"open_issues":13,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CPRF-Session2/Assignment9/pulls/9"},"html":{"href":"https://github.com/CPRF-Session2/Assignment9/pull/9"},"issue":{"href":"https://api.github.com/repos/CPRF-Session2/Assignment9/issues/9"},"comments":{"href":"https://api.github.com/repos/CPRF-Session2/Assignment9/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/CPRF-Session2/Assignment9/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/CPRF-Session2/Assignment9/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CPRF-Session2/Assignment9/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/CPRF-Session2/Assignment9/statuses/575b34b4e01290db2007f430bdad4edab69d720e"}}}}
{"actor":{"display_login":"lesley2958"}}