{"action":"created","comment":{"url":"https://api.github.com/repos/blmussati/CodeU-Group8/pulls/comments/124364888","pull_request_review_id":46646696,"id":124364888,"diff_hunk":"@@ -0,0 +1,67 @@\n+\"\"\"\r\n+You are given a 2-dimensional map of tiles. Each tile is either land or water.\r\n+You have to write a function that counts the number of islands.\r\n+\r\n+Two tiles belong to the same island if they are both land and are adjacent horizontally or vertically, but not diagonally.\r\n+\r\n+The input to your function is the number of rows, number of columns,\r\n+and a 2-dimensional array of booleans, where false means water and true means land.\r\n+The function should simply return the number of islands.\r\n+\"\"\"\r\n+\r\n+\r\n+# Recursive flood fill algorithm used for the function\r\n+# To check all land has been visited, the approach is similar to recursive definition of Depth-First Search\r\n+def findIsland(rows, cols, mapTiles):\r\n+    # I assume that there is at least one row and one column.\r\n+    islands = 0\r\n+    for x in range(rows):\r\n+        for y in range(cols):\r\n+            # If at position (x,y) there is a piece of land, it means an island not yet visited has been found\r\n+            # Maybe I can write the if condition as: if mapTiles[x][y] is True\r\n+            if mapTiles[x][y] == True:\r","path":"findIsland.py","position":22,"original_position":22,"commit_id":"4e95b32f8a978cfa073022b65d0e22395be1ac2d","original_commit_id":"4e95b32f8a978cfa073022b65d0e22395be1ac2d","user":{"login":"muzaluisa","id":10758324,"avatar_url":"https://avatars1.githubusercontent.com/u/10758324?v=3","gravatar_id":"","url":"https://api.github.com/users/muzaluisa","html_url":"https://github.com/muzaluisa","followers_url":"https://api.github.com/users/muzaluisa/followers","following_url":"https://api.github.com/users/muzaluisa/following{/other_user}","gists_url":"https://api.github.com/users/muzaluisa/gists{/gist_id}","starred_url":"https://api.github.com/users/muzaluisa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muzaluisa/subscriptions","organizations_url":"https://api.github.com/users/muzaluisa/orgs","repos_url":"https://api.github.com/users/muzaluisa/repos","events_url":"https://api.github.com/users/muzaluisa/events{/privacy}","received_events_url":"https://api.github.com/users/muzaluisa/received_events","type":"User","site_admin":false},"body":"if mapTiles[x][y] works perfectly)","created_at":"2017-06-27T18:55:16Z","updated_at":"2017-06-27T18:55:16Z","html_url":"https://github.com/blmussati/CodeU-Group8/pull/6#discussion_r124364888","pull_request_url":"https://api.github.com/repos/blmussati/CodeU-Group8/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/blmussati/CodeU-Group8/pulls/comments/124364888"},"html":{"href":"https://github.com/blmussati/CodeU-Group8/pull/6#discussion_r124364888"},"pull_request":{"href":"https://api.github.com/repos/blmussati/CodeU-Group8/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/blmussati/CodeU-Group8/pulls/6","id":127330320,"html_url":"https://github.com/blmussati/CodeU-Group8/pull/6","diff_url":"https://github.com/blmussati/CodeU-Group8/pull/6.diff","patch_url":"https://github.com/blmussati/CodeU-Group8/pull/6.patch","issue_url":"https://api.github.com/repos/blmussati/CodeU-Group8/issues/6","number":6,"state":"open","locked":false,"title":"Recursive version of the function","user":{"login":"blmussati","id":15186507,"avatar_url":"https://avatars0.githubusercontent.com/u/15186507?v=3","gravatar_id":"","url":"https://api.github.com/users/blmussati","html_url":"https://github.com/blmussati","followers_url":"https://api.github.com/users/blmussati/followers","following_url":"https://api.github.com/users/blmussati/following{/other_user}","gists_url":"https://api.github.com/users/blmussati/gists{/gist_id}","starred_url":"https://api.github.com/users/blmussati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blmussati/subscriptions","organizations_url":"https://api.github.com/users/blmussati/orgs","repos_url":"https://api.github.com/users/blmussati/repos","events_url":"https://api.github.com/users/blmussati/events{/privacy}","received_events_url":"https://api.github.com/users/blmussati/received_events","type":"User","site_admin":false},"body":"Assignment 4 solution with recursive definition of the function.\r\n\r\nWill try to think about an iterative solution in the next few days :)","created_at":"2017-06-24T13:35:35Z","updated_at":"2017-06-27T18:55:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ba4f18bc9f72c8cdee6a169e792b0aca2ed94e75","assignee":null,"assignees":[],"requested_reviewers":[{"login":"windo","id":171137,"avatar_url":"https://avatars3.githubusercontent.com/u/171137?v=3","gravatar_id":"","url":"https://api.github.com/users/windo","html_url":"https://github.com/windo","followers_url":"https://api.github.com/users/windo/followers","following_url":"https://api.github.com/users/windo/following{/other_user}","gists_url":"https://api.github.com/users/windo/gists{/gist_id}","starred_url":"https://api.github.com/users/windo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/windo/subscriptions","organizations_url":"https://api.github.com/users/windo/orgs","repos_url":"https://api.github.com/users/windo/repos","events_url":"https://api.github.com/users/windo/events{/privacy}","received_events_url":"https://api.github.com/users/windo/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/blmussati/CodeU-Group8/pulls/6/commits","review_comments_url":"https://api.github.com/repos/blmussati/CodeU-Group8/pulls/6/comments","review_comment_url":"https://api.github.com/repos/blmussati/CodeU-Group8/pulls/comments{/number}","comments_url":"https://api.github.com/repos/blmussati/CodeU-Group8/issues/6/comments","statuses_url":"https://api.github.com/repos/blmussati/CodeU-Group8/statuses/4e95b32f8a978cfa073022b65d0e22395be1ac2d","head":{"label":"blmussati:assignment4","ref":"assignment4","sha":"4e95b32f8a978cfa073022b65d0e22395be1ac2d","user":{"login":"blmussati","id":15186507,"avatar_url":"https://avatars0.githubusercontent.com/u/15186507?v=3","gravatar_id":"","url":"https://api.github.com/users/blmussati","html_url":"https://github.com/blmussati","followers_url":"https://api.github.com/users/blmussati/followers","following_url":"https://api.github.com/users/blmussati/following{/other_user}","gists_url":"https://api.github.com/users/blmussati/gists{/gist_id}","starred_url":"https://api.github.com/users/blmussati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blmussati/subscriptions","organizations_url":"https://api.github.com/users/blmussati/orgs","repos_url":"https://api.github.com/users/blmussati/repos","events_url":"https://api.github.com/users/blmussati/events{/privacy}","received_events_url":"https://api.github.com/users/blmussati/received_events","type":"User","site_admin":false},"repo":{"id":91704067,"name":"CodeU-Group8","full_name":"blmussati/CodeU-Group8","owner":{"login":"blmussati","id":15186507,"avatar_url":"https://avatars0.githubusercontent.com/u/15186507?v=3","gravatar_id":"","url":"https://api.github.com/users/blmussati","html_url":"https://github.com/blmussati","followers_url":"https://api.github.com/users/blmussati/followers","following_url":"https://api.github.com/users/blmussati/following{/other_user}","gists_url":"https://api.github.com/users/blmussati/gists{/gist_id}","starred_url":"https://api.github.com/users/blmussati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blmussati/subscriptions","organizations_url":"https://api.github.com/users/blmussati/orgs","repos_url":"https://api.github.com/users/blmussati/repos","events_url":"https://api.github.com/users/blmussati/events{/privacy}","received_events_url":"https://api.github.com/users/blmussati/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/blmussati/CodeU-Group8","description":"Assignments for program CodeU","fork":false,"url":"https://api.github.com/repos/blmussati/CodeU-Group8","forks_url":"https://api.github.com/repos/blmussati/CodeU-Group8/forks","keys_url":"https://api.github.com/repos/blmussati/CodeU-Group8/keys{/key_id}","collaborators_url":"https://api.github.com/repos/blmussati/CodeU-Group8/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/blmussati/CodeU-Group8/teams","hooks_url":"https://api.github.com/repos/blmussati/CodeU-Group8/hooks","issue_events_url":"https://api.github.com/repos/blmussati/CodeU-Group8/issues/events{/number}","events_url":"https://api.github.com/repos/blmussati/CodeU-Group8/events","assignees_url":"https://api.github.com/repos/blmussati/CodeU-Group8/assignees{/user}","branches_url":"https://api.github.com/repos/blmussati/CodeU-Group8/branches{/branch}","tags_url":"https://api.github.com/repos/blmussati/CodeU-Group8/tags","blobs_url":"https://api.github.com/repos/blmussati/CodeU-Group8/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/blmussati/CodeU-Group8/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/blmussati/CodeU-Group8/git/refs{/sha}","trees_url":"https://api.github.com/repos/blmussati/CodeU-Group8/git/trees{/sha}","statuses_url":"https://api.github.com/repos/blmussati/CodeU-Group8/statuses/{sha}","languages_url":"https://api.github.com/repos/blmussati/CodeU-Group8/languages","stargazers_url":"https://api.github.com/repos/blmussati/CodeU-Group8/stargazers","contributors_url":"https://api.github.com/repos/blmussati/CodeU-Group8/contributors","subscribers_url":"https://api.github.com/repos/blmussati/CodeU-Group8/subscribers","subscription_url":"https://api.github.com/repos/blmussati/CodeU-Group8/subscription","commits_url":"https://api.github.com/repos/blmussati/CodeU-Group8/commits{/sha}","git_commits_url":"https://api.github.com/repos/blmussati/CodeU-Group8/git/commits{/sha}","comments_url":"https://api.github.com/repos/blmussati/CodeU-Group8/comments{/number}","issue_comment_url":"https://api.github.com/repos/blmussati/CodeU-Group8/issues/comments{/number}","contents_url":"https://api.github.com/repos/blmussati/CodeU-Group8/contents/{+path}","compare_url":"https://api.github.com/repos/blmussati/CodeU-Group8/compare/{base}...{head}","merges_url":"https://api.github.com/repos/blmussati/CodeU-Group8/merges","archive_url":"https://api.github.com/repos/blmussati/CodeU-Group8/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/blmussati/CodeU-Group8/downloads","issues_url":"https://api.github.com/repos/blmussati/CodeU-Group8/issues{/number}","pulls_url":"https://api.github.com/repos/blmussati/CodeU-Group8/pulls{/number}","milestones_url":"https://api.github.com/repos/blmussati/CodeU-Group8/milestones{/number}","notifications_url":"https://api.github.com/repos/blmussati/CodeU-Group8/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/blmussati/CodeU-Group8/labels{/name}","releases_url":"https://api.github.com/repos/blmussati/CodeU-Group8/releases{/id}","deployments_url":"https://api.github.com/repos/blmussati/CodeU-Group8/deployments","created_at":"2017-05-18T14:36:37Z","updated_at":"2017-05-18T22:04:36Z","pushed_at":"2017-06-24T13:35:36Z","git_url":"git://github.com/blmussati/CodeU-Group8.git","ssh_url":"git@github.com:blmussati/CodeU-Group8.git","clone_url":"https://github.com/blmussati/CodeU-Group8.git","svn_url":"https://github.com/blmussati/CodeU-Group8","homepage":"","size":11,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"base":{"label":"blmussati:master","ref":"master","sha":"06e500cab8b5f3fcb6da42614cb08a3a8b8f739c","user":{"login":"blmussati","id":15186507,"avatar_url":"https://avatars0.githubusercontent.com/u/15186507?v=3","gravatar_id":"","url":"https://api.github.com/users/blmussati","html_url":"https://github.com/blmussati","followers_url":"https://api.github.com/users/blmussati/followers","following_url":"https://api.github.com/users/blmussati/following{/other_user}","gists_url":"https://api.github.com/users/blmussati/gists{/gist_id}","starred_url":"https://api.github.com/users/blmussati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blmussati/subscriptions","organizations_url":"https://api.github.com/users/blmussati/orgs","repos_url":"https://api.github.com/users/blmussati/repos","events_url":"https://api.github.com/users/blmussati/events{/privacy}","received_events_url":"https://api.github.com/users/blmussati/received_events","type":"User","site_admin":false},"repo":{"id":91704067,"name":"CodeU-Group8","full_name":"blmussati/CodeU-Group8","owner":{"login":"blmussati","id":15186507,"avatar_url":"https://avatars0.githubusercontent.com/u/15186507?v=3","gravatar_id":"","url":"https://api.github.com/users/blmussati","html_url":"https://github.com/blmussati","followers_url":"https://api.github.com/users/blmussati/followers","following_url":"https://api.github.com/users/blmussati/following{/other_user}","gists_url":"https://api.github.com/users/blmussati/gists{/gist_id}","starred_url":"https://api.github.com/users/blmussati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blmussati/subscriptions","organizations_url":"https://api.github.com/users/blmussati/orgs","repos_url":"https://api.github.com/users/blmussati/repos","events_url":"https://api.github.com/users/blmussati/events{/privacy}","received_events_url":"https://api.github.com/users/blmussati/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/blmussati/CodeU-Group8","description":"Assignments for program CodeU","fork":false,"url":"https://api.github.com/repos/blmussati/CodeU-Group8","forks_url":"https://api.github.com/repos/blmussati/CodeU-Group8/forks","keys_url":"https://api.github.com/repos/blmussati/CodeU-Group8/keys{/key_id}","collaborators_url":"https://api.github.com/repos/blmussati/CodeU-Group8/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/blmussati/CodeU-Group8/teams","hooks_url":"https://api.github.com/repos/blmussati/CodeU-Group8/hooks","issue_events_url":"https://api.github.com/repos/blmussati/CodeU-Group8/issues/events{/number}","events_url":"https://api.github.com/repos/blmussati/CodeU-Group8/events","assignees_url":"https://api.github.com/repos/blmussati/CodeU-Group8/assignees{/user}","branches_url":"https://api.github.com/repos/blmussati/CodeU-Group8/branches{/branch}","tags_url":"https://api.github.com/repos/blmussati/CodeU-Group8/tags","blobs_url":"https://api.github.com/repos/blmussati/CodeU-Group8/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/blmussati/CodeU-Group8/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/blmussati/CodeU-Group8/git/refs{/sha}","trees_url":"https://api.github.com/repos/blmussati/CodeU-Group8/git/trees{/sha}","statuses_url":"https://api.github.com/repos/blmussati/CodeU-Group8/statuses/{sha}","languages_url":"https://api.github.com/repos/blmussati/CodeU-Group8/languages","stargazers_url":"https://api.github.com/repos/blmussati/CodeU-Group8/stargazers","contributors_url":"https://api.github.com/repos/blmussati/CodeU-Group8/contributors","subscribers_url":"https://api.github.com/repos/blmussati/CodeU-Group8/subscribers","subscription_url":"https://api.github.com/repos/blmussati/CodeU-Group8/subscription","commits_url":"https://api.github.com/repos/blmussati/CodeU-Group8/commits{/sha}","git_commits_url":"https://api.github.com/repos/blmussati/CodeU-Group8/git/commits{/sha}","comments_url":"https://api.github.com/repos/blmussati/CodeU-Group8/comments{/number}","issue_comment_url":"https://api.github.com/repos/blmussati/CodeU-Group8/issues/comments{/number}","contents_url":"https://api.github.com/repos/blmussati/CodeU-Group8/contents/{+path}","compare_url":"https://api.github.com/repos/blmussati/CodeU-Group8/compare/{base}...{head}","merges_url":"https://api.github.com/repos/blmussati/CodeU-Group8/merges","archive_url":"https://api.github.com/repos/blmussati/CodeU-Group8/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/blmussati/CodeU-Group8/downloads","issues_url":"https://api.github.com/repos/blmussati/CodeU-Group8/issues{/number}","pulls_url":"https://api.github.com/repos/blmussati/CodeU-Group8/pulls{/number}","milestones_url":"https://api.github.com/repos/blmussati/CodeU-Group8/milestones{/number}","notifications_url":"https://api.github.com/repos/blmussati/CodeU-Group8/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/blmussati/CodeU-Group8/labels{/name}","releases_url":"https://api.github.com/repos/blmussati/CodeU-Group8/releases{/id}","deployments_url":"https://api.github.com/repos/blmussati/CodeU-Group8/deployments","created_at":"2017-05-18T14:36:37Z","updated_at":"2017-05-18T22:04:36Z","pushed_at":"2017-06-24T13:35:36Z","git_url":"git://github.com/blmussati/CodeU-Group8.git","ssh_url":"git@github.com:blmussati/CodeU-Group8.git","clone_url":"https://github.com/blmussati/CodeU-Group8.git","svn_url":"https://github.com/blmussati/CodeU-Group8","homepage":"","size":11,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/blmussati/CodeU-Group8/pulls/6"},"html":{"href":"https://github.com/blmussati/CodeU-Group8/pull/6"},"issue":{"href":"https://api.github.com/repos/blmussati/CodeU-Group8/issues/6"},"comments":{"href":"https://api.github.com/repos/blmussati/CodeU-Group8/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/blmussati/CodeU-Group8/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/blmussati/CodeU-Group8/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/blmussati/CodeU-Group8/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/blmussati/CodeU-Group8/statuses/4e95b32f8a978cfa073022b65d0e22395be1ac2d"}}}}
{"actor":{"display_login":"muzaluisa"}}