{"action":"created","comment":{"url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/pulls/comments/199765175","pull_request_review_id":133946017,"id":199765175,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5OTc2NTE3NQ==","diff_hunk":"@@ -0,0 +1,65 @@\n+#include<iostream>\n+#include<vector>\n+using namespace std;\n+\n+class MinHeap{\n+    public:\n+        vector<int> v;\n+        //Constructor\n+        MinHeap(){\n+            //Setting v[0] to any garbage considering only positive elements inside heap\n+            v.push_back(-1);\n+        }\n+        //building the heap\n+        void buildHeap(int data){\n+            v.push_back(data);\n+            int index = v.size() -1;\n+            int parent = index/2;\n+\n+            while(index > 1 && v[index] < v[parent]){\n+                swap(v[index],v[parent]);\n+                index = parent;\n+                parent = index /2;\n+            }\n+        }\n+};\n+\n+int main(){\n+    int size_arr_one,size_arr_two,num;\n+    cout << \"Enter the number of elements of the first heap\" << endl;\n+    cin >> size_arr_one;\n+    //int arr_one [] = {1,4,3,2,6,0,10,12};\n+    //int arr_two [] = {9,7,5,8};\n+    //Creating a heap into memory\n+    MinHeap h;\n+    //inseting the elements and thus building the heap\n+    cout << \"Enter the elements to be inserted into the first heap\" << endl;\n+    for(int i = 0;i < size_arr_one;i++){\n+        cin >> num;\n+        h.buildHeap(num);\n+    }\n+    cout << \"The elements of the first heap are\" << endl;\n+    for(int i = 1;i < h.v.size() ;i++){\n+        cout << h.v[i] << \" \";\n+    }\n+    cout << endl;\n+    cout << \"Enter the number of elements of the second heap\" << endl;\n+    cin >> size_arr_two;\n+    cout << \"Enter the elements to be inserted into the second heap\" << endl;\n+    for(int i = 0;i < size_arr_two;i++){\n+        cin >> num;\n+        h.buildHeap(num);","path":"Data Structures/Heaps/merging_two_heaps.cpp","position":51,"original_position":51,"commit_id":"dee5f30f47e7c777f5abf0b42c4ee195d85b554b","original_commit_id":"693d1e8099f734470bae6bb53b6d40f04fd7acb8","user":{"login":"sourabh1031","id":25590627,"node_id":"MDQ6VXNlcjI1NTkwNjI3","avatar_url":"https://avatars3.githubusercontent.com/u/25590627?v=4","gravatar_id":"","url":"https://api.github.com/users/sourabh1031","html_url":"https://github.com/sourabh1031","followers_url":"https://api.github.com/users/sourabh1031/followers","following_url":"https://api.github.com/users/sourabh1031/following{/other_user}","gists_url":"https://api.github.com/users/sourabh1031/gists{/gist_id}","starred_url":"https://api.github.com/users/sourabh1031/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sourabh1031/subscriptions","organizations_url":"https://api.github.com/users/sourabh1031/orgs","repos_url":"https://api.github.com/users/sourabh1031/repos","events_url":"https://api.github.com/users/sourabh1031/events{/privacy}","received_events_url":"https://api.github.com/users/sourabh1031/received_events","type":"User","site_admin":false},"body":"@sahilbansal17 i have changed heap.cpp file please review it","created_at":"2018-07-03T10:57:13Z","updated_at":"2018-07-03T10:57:14Z","html_url":"https://github.com/sahilbansal17/Competitive_Coding/pull/137#discussion_r199765175","pull_request_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/pulls/137","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/pulls/comments/199765175"},"html":{"href":"https://github.com/sahilbansal17/Competitive_Coding/pull/137#discussion_r199765175"},"pull_request":{"href":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/pulls/137"}},"in_reply_to_id":199482085},"pull_request":{"url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/pulls/137","id":198618446,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4NjE4NDQ2","html_url":"https://github.com/sahilbansal17/Competitive_Coding/pull/137","diff_url":"https://github.com/sahilbansal17/Competitive_Coding/pull/137.diff","patch_url":"https://github.com/sahilbansal17/Competitive_Coding/pull/137.patch","issue_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/issues/137","number":137,"state":"open","locked":false,"title":"Heap data structure operations and merging two heaps","user":{"login":"sourabh1031","id":25590627,"node_id":"MDQ6VXNlcjI1NTkwNjI3","avatar_url":"https://avatars3.githubusercontent.com/u/25590627?v=4","gravatar_id":"","url":"https://api.github.com/users/sourabh1031","html_url":"https://github.com/sourabh1031","followers_url":"https://api.github.com/users/sourabh1031/followers","following_url":"https://api.github.com/users/sourabh1031/following{/other_user}","gists_url":"https://api.github.com/users/sourabh1031/gists{/gist_id}","starred_url":"https://api.github.com/users/sourabh1031/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sourabh1031/subscriptions","organizations_url":"https://api.github.com/users/sourabh1031/orgs","repos_url":"https://api.github.com/users/sourabh1031/repos","events_url":"https://api.github.com/users/sourabh1031/events{/privacy}","received_events_url":"https://api.github.com/users/sourabh1031/received_events","type":"User","site_admin":false},"body":"Please review @sahilbansal17 ","created_at":"2018-07-02T09:19:42Z","updated_at":"2018-07-03T10:57:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9980fef60416ce74c4f1dcb87a523671cec56742","assignee":{"login":"vikasgola","id":24772296,"node_id":"MDQ6VXNlcjI0NzcyMjk2","avatar_url":"https://avatars1.githubusercontent.com/u/24772296?v=4","gravatar_id":"","url":"https://api.github.com/users/vikasgola","html_url":"https://github.com/vikasgola","followers_url":"https://api.github.com/users/vikasgola/followers","following_url":"https://api.github.com/users/vikasgola/following{/other_user}","gists_url":"https://api.github.com/users/vikasgola/gists{/gist_id}","starred_url":"https://api.github.com/users/vikasgola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vikasgola/subscriptions","organizations_url":"https://api.github.com/users/vikasgola/orgs","repos_url":"https://api.github.com/users/vikasgola/repos","events_url":"https://api.github.com/users/vikasgola/events{/privacy}","received_events_url":"https://api.github.com/users/vikasgola/received_events","type":"User","site_admin":false},"assignees":[{"login":"vikasgola","id":24772296,"node_id":"MDQ6VXNlcjI0NzcyMjk2","avatar_url":"https://avatars1.githubusercontent.com/u/24772296?v=4","gravatar_id":"","url":"https://api.github.com/users/vikasgola","html_url":"https://github.com/vikasgola","followers_url":"https://api.github.com/users/vikasgola/followers","following_url":"https://api.github.com/users/vikasgola/following{/other_user}","gists_url":"https://api.github.com/users/vikasgola/gists{/gist_id}","starred_url":"https://api.github.com/users/vikasgola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vikasgola/subscriptions","organizations_url":"https://api.github.com/users/vikasgola/orgs","repos_url":"https://api.github.com/users/vikasgola/repos","events_url":"https://api.github.com/users/vikasgola/events{/privacy}","received_events_url":"https://api.github.com/users/vikasgola/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/137/commits","review_comments_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/pulls/137/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/137/comments","statuses_url":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/statuses/dee5f30f47e7c777f5abf0b42c4ee195d85b554b","head":{"label":"sourabh1031:test","ref":"test","sha":"dee5f30f47e7c777f5abf0b42c4ee195d85b554b","user":{"login":"sourabh1031","id":25590627,"node_id":"MDQ6VXNlcjI1NTkwNjI3","avatar_url":"https://avatars3.githubusercontent.com/u/25590627?v=4","gravatar_id":"","url":"https://api.github.com/users/sourabh1031","html_url":"https://github.com/sourabh1031","followers_url":"https://api.github.com/users/sourabh1031/followers","following_url":"https://api.github.com/users/sourabh1031/following{/other_user}","gists_url":"https://api.github.com/users/sourabh1031/gists{/gist_id}","starred_url":"https://api.github.com/users/sourabh1031/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sourabh1031/subscriptions","organizations_url":"https://api.github.com/users/sourabh1031/orgs","repos_url":"https://api.github.com/users/sourabh1031/repos","events_url":"https://api.github.com/users/sourabh1031/events{/privacy}","received_events_url":"https://api.github.com/users/sourabh1031/received_events","type":"User","site_admin":false},"repo":{"id":139140599,"node_id":"MDEwOlJlcG9zaXRvcnkxMzkxNDA1OTk=","name":"Competitive_Coding","full_name":"sourabh1031/Competitive_Coding","owner":{"login":"sourabh1031","id":25590627,"node_id":"MDQ6VXNlcjI1NTkwNjI3","avatar_url":"https://avatars3.githubusercontent.com/u/25590627?v=4","gravatar_id":"","url":"https://api.github.com/users/sourabh1031","html_url":"https://github.com/sourabh1031","followers_url":"https://api.github.com/users/sourabh1031/followers","following_url":"https://api.github.com/users/sourabh1031/following{/other_user}","gists_url":"https://api.github.com/users/sourabh1031/gists{/gist_id}","starred_url":"https://api.github.com/users/sourabh1031/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sourabh1031/subscriptions","organizations_url":"https://api.github.com/users/sourabh1031/orgs","repos_url":"https://api.github.com/users/sourabh1031/repos","events_url":"https://api.github.com/users/sourabh1031/events{/privacy}","received_events_url":"https://api.github.com/users/sourabh1031/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sourabh1031/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/sourabh1031/Competitive_Coding","forks_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/forks","keys_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/teams","hooks_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/hooks","issue_events_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/issues/events{/number}","events_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/events","assignees_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/assignees{/user}","branches_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/branches{/branch}","tags_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/tags","blobs_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/git/refs{/sha}","trees_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/statuses/{sha}","languages_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/languages","stargazers_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/stargazers","contributors_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/contributors","subscribers_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/subscribers","subscription_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/subscription","commits_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/commits{/sha}","git_commits_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/git/commits{/sha}","comments_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/comments{/number}","issue_comment_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/issues/comments{/number}","contents_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/contents/{+path}","compare_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/merges","archive_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/downloads","issues_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/issues{/number}","pulls_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/pulls{/number}","milestones_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/milestones{/number}","notifications_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/labels{/name}","releases_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/releases{/id}","deployments_url":"https://api.github.com/repos/sourabh1031/Competitive_Coding/deployments","created_at":"2018-06-29T11:17:44Z","updated_at":"2018-06-29T11:17:46Z","pushed_at":"2018-07-03T10:56:24Z","git_url":"git://github.com/sourabh1031/Competitive_Coding.git","ssh_url":"git@github.com:sourabh1031/Competitive_Coding.git","clone_url":"https://github.com/sourabh1031/Competitive_Coding.git","svn_url":"https://github.com/sourabh1031/Competitive_Coding","homepage":null,"size":247,"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":"fde3d6eed345567daf19fccadde01ce9bd23e7a2","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-07-03T10:45:41Z","pushed_at":"2018-07-03T10:56:25Z","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":251,"stargazers_count":29,"watchers_count":29,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":53,"mirror_url":null,"archived":false,"open_issues_count":22,"license":null,"forks":53,"open_issues":22,"watchers":29,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/pulls/137"},"html":{"href":"https://github.com/sahilbansal17/Competitive_Coding/pull/137"},"issue":{"href":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/issues/137"},"comments":{"href":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/issues/137/comments"},"review_comments":{"href":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/pulls/137/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/137/commits"},"statuses":{"href":"https://api.github.com/repos/sahilbansal17/Competitive_Coding/statuses/dee5f30f47e7c777f5abf0b42c4ee195d85b554b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"sourabh1031"}}