{"action":"created","comment":{"url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/pulls/comments/198199197","pull_request_review_id":132086361,"id":198199197,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5ODE5OTE5Nw==","diff_hunk":"@@ -0,0 +1,105 @@\n+\n+/*  The following is an implementation of Prim's algorithm\n+    using adjacency list representation of a graph. The data structure\n+    min heap is used for this. There are, again, two implementations\n+    in this, the min heap code can be written differently in a class, or\n+    the priority_queue present in STL can be used. Here, it's the\n+    latter.\n+    Now, a priority_queue is essentially a max heap, but can be used\n+    as given below to form a min heap. The loop statements execute\n+    v+e times, in addition to log(v) time for adding to priority_queue.\n+    Overall, O(v+e)*O(log(v)) = O((e+v)*log(v)) = O(e*log(v))\n+    Since for a connected graph, v = O(e).\n+\n+    The pop() and top() operations take O(log(v)) and O(1) time\n+    respectively.\n+*/\n+\n+#include<bits/stdc++.h>\n+#define INF INT_MAX\n+\n+using namespace std;\n+\n+int main(){\n+\n+    int k = 0;\n+    for (k = 0; k < 5; k++){\n+        cout<<k;","path":"Algorithms/Graphs/MST/prim2.cpp","position":null,"original_position":27,"commit_id":"434850869e743db416e6114282a7004d37e3a257","original_commit_id":"370dddccb7f64ac772aa0cc0efc2a0272531944a","user":{"login":"tanvi15","id":29301442,"node_id":"MDQ6VXNlcjI5MzAxNDQy","avatar_url":"https://avatars2.githubusercontent.com/u/29301442?v=4","gravatar_id":"","url":"https://api.github.com/users/tanvi15","html_url":"https://github.com/tanvi15","followers_url":"https://api.github.com/users/tanvi15/followers","following_url":"https://api.github.com/users/tanvi15/following{/other_user}","gists_url":"https://api.github.com/users/tanvi15/gists{/gist_id}","starred_url":"https://api.github.com/users/tanvi15/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tanvi15/subscriptions","organizations_url":"https://api.github.com/users/tanvi15/orgs","repos_url":"https://api.github.com/users/tanvi15/repos","events_url":"https://api.github.com/users/tanvi15/events{/privacy}","received_events_url":"https://api.github.com/users/tanvi15/received_events","type":"User","site_admin":false},"body":"I was writing that somewhere else, got pasted here by mistake. Really sorry.","created_at":"2018-06-26T15:48:37Z","updated_at":"2018-06-26T15:48:37Z","html_url":"https://github.com/sahilbansal17/Competitive_Coding/pull/90#discussion_r198199197","pull_request_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/pulls/90","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/pulls/comments/198199197"},"html":{"href":"https://github.com/sahilbansal17/Competitive_Coding/pull/90#discussion_r198199197"},"pull_request":{"href":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/pulls/90"}},"in_reply_to_id":198196946},"pull_request":{"url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/pulls/90","id":197335597,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk3MzM1NTk3","html_url":"https://github.com/sahilbansal17/Competitive_Coding/pull/90","diff_url":"https://github.com/sahilbansal17/Competitive_Coding/pull/90.diff","patch_url":"https://github.com/sahilbansal17/Competitive_Coding/pull/90.patch","issue_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/issues/90","number":90,"state":"open","locked":false,"title":"Add Prim's algorithm (Complexity : ElogV)","user":{"login":"tanvi15","id":29301442,"node_id":"MDQ6VXNlcjI5MzAxNDQy","avatar_url":"https://avatars2.githubusercontent.com/u/29301442?v=4","gravatar_id":"","url":"https://api.github.com/users/tanvi15","html_url":"https://github.com/tanvi15","followers_url":"https://api.github.com/users/tanvi15/followers","following_url":"https://api.github.com/users/tanvi15/following{/other_user}","gists_url":"https://api.github.com/users/tanvi15/gists{/gist_id}","starred_url":"https://api.github.com/users/tanvi15/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tanvi15/subscriptions","organizations_url":"https://api.github.com/users/tanvi15/orgs","repos_url":"https://api.github.com/users/tanvi15/repos","events_url":"https://api.github.com/users/tanvi15/events{/privacy}","received_events_url":"https://api.github.com/users/tanvi15/received_events","type":"User","site_admin":false},"body":"Issue #34 ","created_at":"2018-06-26T08:07:20Z","updated_at":"2018-06-26T15:48:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ef85c85e72d29c63594e3e3239989a46715db5d0","assignee":{"login":"sahilbansal17","id":19902688,"node_id":"MDQ6VXNlcjE5OTAyNjg4","avatar_url":"https://avatars3.githubusercontent.com/u/19902688?v=4","gravatar_id":"","url":"https://api.github.com/users/sahilbansal17","html_url":"https://github.com/sahilbansal17","followers_url":"https://api.github.com/users/sahilbansal17/followers","following_url":"https://api.github.com/users/sahilbansal17/following{/other_user}","gists_url":"https://api.github.com/users/sahilbansal17/gists{/gist_id}","starred_url":"https://api.github.com/users/sahilbansal17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sahilbansal17/subscriptions","organizations_url":"https://api.github.com/users/sahilbansal17/orgs","repos_url":"https://api.github.com/users/sahilbansal17/repos","events_url":"https://api.github.com/users/sahilbansal17/events{/privacy}","received_events_url":"https://api.github.com/users/sahilbansal17/received_events","type":"User","site_admin":false},"assignees":[{"login":"sahilbansal17","id":19902688,"node_id":"MDQ6VXNlcjE5OTAyNjg4","avatar_url":"https://avatars3.githubusercontent.com/u/19902688?v=4","gravatar_id":"","url":"https://api.github.com/users/sahilbansal17","html_url":"https://github.com/sahilbansal17","followers_url":"https://api.github.com/users/sahilbansal17/followers","following_url":"https://api.github.com/users/sahilbansal17/following{/other_user}","gists_url":"https://api.github.com/users/sahilbansal17/gists{/gist_id}","starred_url":"https://api.github.com/users/sahilbansal17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sahilbansal17/subscriptions","organizations_url":"https://api.github.com/users/sahilbansal17/orgs","repos_url":"https://api.github.com/users/sahilbansal17/repos","events_url":"https://api.github.com/users/sahilbansal17/events{/privacy}","received_events_url":"https://api.github.com/users/sahilbansal17/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/pulls/90/commits","review_comments_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/pulls/90/comments","review_comment_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/issues/90/comments","statuses_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/statuses/434850869e743db416e6114282a7004d37e3a257","head":{"label":"tanvi15:dev","ref":"dev","sha":"434850869e743db416e6114282a7004d37e3a257","user":{"login":"tanvi15","id":29301442,"node_id":"MDQ6VXNlcjI5MzAxNDQy","avatar_url":"https://avatars2.githubusercontent.com/u/29301442?v=4","gravatar_id":"","url":"https://api.github.com/users/tanvi15","html_url":"https://github.com/tanvi15","followers_url":"https://api.github.com/users/tanvi15/followers","following_url":"https://api.github.com/users/tanvi15/following{/other_user}","gists_url":"https://api.github.com/users/tanvi15/gists{/gist_id}","starred_url":"https://api.github.com/users/tanvi15/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tanvi15/subscriptions","organizations_url":"https://api.github.com/users/tanvi15/orgs","repos_url":"https://api.github.com/users/tanvi15/repos","events_url":"https://api.github.com/users/tanvi15/events{/privacy}","received_events_url":"https://api.github.com/users/tanvi15/received_events","type":"User","site_admin":false},"repo":{"id":138704664,"node_id":"MDEwOlJlcG9zaXRvcnkxMzg3MDQ2NjQ=","name":"Competitive_Coding","full_name":"tanvi15/Competitive_Coding","owner":{"login":"tanvi15","id":29301442,"node_id":"MDQ6VXNlcjI5MzAxNDQy","avatar_url":"https://avatars2.githubusercontent.com/u/29301442?v=4","gravatar_id":"","url":"https://api.github.com/users/tanvi15","html_url":"https://github.com/tanvi15","followers_url":"https://api.github.com/users/tanvi15/followers","following_url":"https://api.github.com/users/tanvi15/following{/other_user}","gists_url":"https://api.github.com/users/tanvi15/gists{/gist_id}","starred_url":"https://api.github.com/users/tanvi15/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tanvi15/subscriptions","organizations_url":"https://api.github.com/users/tanvi15/orgs","repos_url":"https://api.github.com/users/tanvi15/repos","events_url":"https://api.github.com/users/tanvi15/events{/privacy}","received_events_url":"https://api.github.com/users/tanvi15/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tanvi15/Competitive_Coding","description":"This repository contains some useful codes, techniques, algorithms and problem solutions helpful in Competitive Coding.","fork":true,"url":"https://api.github.com/repos/tanvi15/Competitive_Coding","forks_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/forks","keys_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/teams","hooks_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/hooks","issue_events_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/issues/events{/number}","events_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/events","assignees_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/assignees{/user}","branches_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/branches{/branch}","tags_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/tags","blobs_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/git/refs{/sha}","trees_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/statuses/{sha}","languages_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/languages","stargazers_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/stargazers","contributors_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/contributors","subscribers_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/subscribers","subscription_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/subscription","commits_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/commits{/sha}","git_commits_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/git/commits{/sha}","comments_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/comments{/number}","issue_comment_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/issues/comments{/number}","contents_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/contents/{+path}","compare_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/merges","archive_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/downloads","issues_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/issues{/number}","pulls_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/pulls{/number}","milestones_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/milestones{/number}","notifications_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/labels{/name}","releases_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/releases{/id}","deployments_url":"https://api.github.com/repos/tanvi15/Competitive_Coding/deployments","created_at":"2018-06-26T07:59:52Z","updated_at":"2018-06-26T07:59:54Z","pushed_at":"2018-06-26T15:48:08Z","git_url":"git://github.com/tanvi15/Competitive_Coding.git","ssh_url":"git@github.com:tanvi15/Competitive_Coding.git","clone_url":"https://github.com/tanvi15/Competitive_Coding.git","svn_url":"https://github.com/tanvi15/Competitive_Coding","homepage":null,"size":176,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sahilbansal17:master","ref":"master","sha":"51f9ceb0b3bc7edc5e3932475f12fd611004b4db","user":{"login":"sahilbansal17","id":19902688,"node_id":"MDQ6VXNlcjE5OTAyNjg4","avatar_url":"https://avatars3.githubusercontent.com/u/19902688?v=4","gravatar_id":"","url":"https://api.github.com/users/sahilbansal17","html_url":"https://github.com/sahilbansal17","followers_url":"https://api.github.com/users/sahilbansal17/followers","following_url":"https://api.github.com/users/sahilbansal17/following{/other_user}","gists_url":"https://api.github.com/users/sahilbansal17/gists{/gist_id}","starred_url":"https://api.github.com/users/sahilbansal17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sahilbansal17/subscriptions","organizations_url":"https://api.github.com/users/sahilbansal17/orgs","repos_url":"https://api.github.com/users/sahilbansal17/repos","events_url":"https://api.github.com/users/sahilbansal17/events{/privacy}","received_events_url":"https://api.github.com/users/sahilbansal17/received_events","type":"User","site_admin":false},"repo":{"id":101917327,"node_id":"MDEwOlJlcG9zaXRvcnkxMDE5MTczMjc=","name":"Competitive_Coding","full_name":"sahilbansal17/Competitive_Coding","owner":{"login":"sahilbansal17","id":19902688,"node_id":"MDQ6VXNlcjE5OTAyNjg4","avatar_url":"https://avatars3.githubusercontent.com/u/19902688?v=4","gravatar_id":"","url":"https://api.github.com/users/sahilbansal17","html_url":"https://github.com/sahilbansal17","followers_url":"https://api.github.com/users/sahilbansal17/followers","following_url":"https://api.github.com/users/sahilbansal17/following{/other_user}","gists_url":"https://api.github.com/users/sahilbansal17/gists{/gist_id}","starred_url":"https://api.github.com/users/sahilbansal17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sahilbansal17/subscriptions","organizations_url":"https://api.github.com/users/sahilbansal17/orgs","repos_url":"https://api.github.com/users/sahilbansal17/repos","events_url":"https://api.github.com/users/sahilbansal17/events{/privacy}","received_events_url":"https://api.github.com/users/sahilbansal17/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sahilbansal17/Competitive_Coding","description":"This repository contains some useful codes, techniques, algorithms and problem solutions helpful in Competitive Coding.","fork":false,"url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding","forks_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/forks","keys_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/teams","hooks_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/hooks","issue_events_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/issues/events{/number}","events_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/events","assignees_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/assignees{/user}","branches_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/branches{/branch}","tags_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/tags","blobs_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/git/refs{/sha}","trees_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/statuses/{sha}","languages_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/languages","stargazers_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/stargazers","contributors_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/contributors","subscribers_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/subscribers","subscription_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/subscription","commits_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/commits{/sha}","git_commits_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/git/commits{/sha}","comments_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/comments{/number}","issue_comment_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/issues/comments{/number}","contents_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/contents/{+path}","compare_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/merges","archive_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/downloads","issues_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/issues{/number}","pulls_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/pulls{/number}","milestones_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/milestones{/number}","notifications_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/labels{/name}","releases_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/releases{/id}","deployments_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/deployments","created_at":"2017-08-30T18:46:34Z","updated_at":"2018-06-26T10:34:24Z","pushed_at":"2018-06-26T15:48:09Z","git_url":"git://github.com/sahilbansal17/Competitive_Coding.git","ssh_url":"git@github.com:sahilbansal17/Competitive_Coding.git","clone_url":"https://github.com/sahilbansal17/Competitive_Coding.git","svn_url":"https://github.com/sahilbansal17/Competitive_Coding","homepage":null,"size":179,"stargazers_count":24,"watchers_count":24,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":48,"mirror_url":null,"archived":false,"open_issues_count":40,"license":null,"forks":48,"open_issues":40,"watchers":24,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/pulls/90"},"html":{"href":"https://github.com/sahilbansal17/Competitive_Coding/pull/90"},"issue":{"href":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/issues/90"},"comments":{"href":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/issues/90/comments"},"review_comments":{"href":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/pulls/90/comments"},"review_comment":{"href":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/pulls/90/commits"},"statuses":{"href":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/statuses/434850869e743db416e6114282a7004d37e3a257"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"tanvi15"}}