{"action":"created","comment":{"url":"https://api.github.com/repos/Dbz/Algorithms/pulls/comments/48588446","id":48588446,"diff_hunk":"@@ -0,0 +1,20 @@\n+# Definition for a binary tree node.\n+# class TreeNode\n+#     attr_accessor :val, :left, :right\n+#     def initialize(val)\n+#         @val = val\n+#         @left, @right = nil, nil\n+#     end\n+# end\n+\n+# @param {TreeNode} root\n+# @return {Integer}\n+\n+def min_depth_binary_tree(root)\n+  return 0 unless root\n+  return 1 unless root.left && root.right\n+  return 1 + min_depth_binary_tree(root.left) unless root.right\n+  return 1 + min_depth_binary_tree(root.right) unless root.left","path":"Algorithms/Ruby/min-depth-binary-tree.rb","position":17,"original_position":17,"commit_id":"79b772b057073d036828e16ed7f1465bf6f9e89c","original_commit_id":"79b772b057073d036828e16ed7f1465bf6f9e89c","user":{"login":"Dbz","id":628429,"avatar_url":"https://avatars.githubusercontent.com/u/628429?v=3","gravatar_id":"","url":"https://api.github.com/users/Dbz","html_url":"https://github.com/Dbz","followers_url":"https://api.github.com/users/Dbz/followers","following_url":"https://api.github.com/users/Dbz/following{/other_user}","gists_url":"https://api.github.com/users/Dbz/gists{/gist_id}","starred_url":"https://api.github.com/users/Dbz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dbz/subscriptions","organizations_url":"https://api.github.com/users/Dbz/orgs","repos_url":"https://api.github.com/users/Dbz/repos","events_url":"https://api.github.com/users/Dbz/events{/privacy}","received_events_url":"https://api.github.com/users/Dbz/received_events","type":"User","site_admin":false},"body":"I don't think these lines will ever fire because of the `unless root.left && root.right`","created_at":"2015-12-30T06:17:19Z","updated_at":"2015-12-30T06:17:19Z","html_url":"https://github.com/Dbz/Algorithms/pull/10#discussion_r48588446","pull_request_url":"https://api.github.com/repos/Dbz/Algorithms/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/Dbz/Algorithms/pulls/comments/48588446"},"html":{"href":"https://github.com/Dbz/Algorithms/pull/10#discussion_r48588446"},"pull_request":{"href":"https://api.github.com/repos/Dbz/Algorithms/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/Dbz/Algorithms/pulls/10","id":54668995,"html_url":"https://github.com/Dbz/Algorithms/pull/10","diff_url":"https://github.com/Dbz/Algorithms/pull/10.diff","patch_url":"https://github.com/Dbz/Algorithms/pull/10.patch","issue_url":"https://api.github.com/repos/Dbz/Algorithms/issues/10","number":10,"state":"open","locked":false,"title":"Add lots of algorithms","user":{"login":"isisAnchalee","id":5697444,"avatar_url":"https://avatars.githubusercontent.com/u/5697444?v=3","gravatar_id":"","url":"https://api.github.com/users/isisAnchalee","html_url":"https://github.com/isisAnchalee","followers_url":"https://api.github.com/users/isisAnchalee/followers","following_url":"https://api.github.com/users/isisAnchalee/following{/other_user}","gists_url":"https://api.github.com/users/isisAnchalee/gists{/gist_id}","starred_url":"https://api.github.com/users/isisAnchalee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isisAnchalee/subscriptions","organizations_url":"https://api.github.com/users/isisAnchalee/orgs","repos_url":"https://api.github.com/users/isisAnchalee/repos","events_url":"https://api.github.com/users/isisAnchalee/events{/privacy}","received_events_url":"https://api.github.com/users/isisAnchalee/received_events","type":"User","site_admin":false},"body":"## Algorithms Added\r\n- [ ] Remove Duplicates from Str\r\n- [ ] Rate Limiter Class\r\n- [ ] Pascal's Triangle\r\n- [ ] Caeser Cipher\r\n- [ ] Least Common Ancestor in BST\r\n- [ ]  Hamming Weight\r\n- [ ]  Is Same Tree\r\n- [ ]  Majority Element\r\n- [ ]  Remove Value\r\n- [ ]  Valid Anagram\r\n- [ ]  Min Depth Binary Tree JS\r\n- [ ]  Min Depth Binary Tree Ruby\r\n- [ ]  Max Depth Binary Tree Ruby\r\n- [ ]  Climbing Stairs\r\n- [ ]  Add Binary\r\n- [ ]  Find Single Number\r\n","created_at":"2015-12-28T17:04:48Z","updated_at":"2015-12-30T06:17:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4e9e60b377a7c3bbe9f9e6c353086d9a93d86ae0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Dbz/Algorithms/pulls/10/commits","review_comments_url":"https://api.github.com/repos/Dbz/Algorithms/pulls/10/comments","review_comment_url":"https://api.github.com/repos/Dbz/Algorithms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Dbz/Algorithms/issues/10/comments","statuses_url":"https://api.github.com/repos/Dbz/Algorithms/statuses/79b772b057073d036828e16ed7f1465bf6f9e89c","head":{"label":"Dbz:add_algorithms","ref":"add_algorithms","sha":"79b772b057073d036828e16ed7f1465bf6f9e89c","user":{"login":"Dbz","id":628429,"avatar_url":"https://avatars.githubusercontent.com/u/628429?v=3","gravatar_id":"","url":"https://api.github.com/users/Dbz","html_url":"https://github.com/Dbz","followers_url":"https://api.github.com/users/Dbz/followers","following_url":"https://api.github.com/users/Dbz/following{/other_user}","gists_url":"https://api.github.com/users/Dbz/gists{/gist_id}","starred_url":"https://api.github.com/users/Dbz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dbz/subscriptions","organizations_url":"https://api.github.com/users/Dbz/orgs","repos_url":"https://api.github.com/users/Dbz/repos","events_url":"https://api.github.com/users/Dbz/events{/privacy}","received_events_url":"https://api.github.com/users/Dbz/received_events","type":"User","site_admin":false},"repo":{"id":28580097,"name":"Algorithms","full_name":"Dbz/Algorithms","owner":{"login":"Dbz","id":628429,"avatar_url":"https://avatars.githubusercontent.com/u/628429?v=3","gravatar_id":"","url":"https://api.github.com/users/Dbz","html_url":"https://github.com/Dbz","followers_url":"https://api.github.com/users/Dbz/followers","following_url":"https://api.github.com/users/Dbz/following{/other_user}","gists_url":"https://api.github.com/users/Dbz/gists{/gist_id}","starred_url":"https://api.github.com/users/Dbz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dbz/subscriptions","organizations_url":"https://api.github.com/users/Dbz/orgs","repos_url":"https://api.github.com/users/Dbz/repos","events_url":"https://api.github.com/users/Dbz/events{/privacy}","received_events_url":"https://api.github.com/users/Dbz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Dbz/Algorithms","description":"Data Structures & Algorithms","fork":false,"url":"https://api.github.com/repos/Dbz/Algorithms","forks_url":"https://api.github.com/repos/Dbz/Algorithms/forks","keys_url":"https://api.github.com/repos/Dbz/Algorithms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Dbz/Algorithms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Dbz/Algorithms/teams","hooks_url":"https://api.github.com/repos/Dbz/Algorithms/hooks","issue_events_url":"https://api.github.com/repos/Dbz/Algorithms/issues/events{/number}","events_url":"https://api.github.com/repos/Dbz/Algorithms/events","assignees_url":"https://api.github.com/repos/Dbz/Algorithms/assignees{/user}","branches_url":"https://api.github.com/repos/Dbz/Algorithms/branches{/branch}","tags_url":"https://api.github.com/repos/Dbz/Algorithms/tags","blobs_url":"https://api.github.com/repos/Dbz/Algorithms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Dbz/Algorithms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Dbz/Algorithms/git/refs{/sha}","trees_url":"https://api.github.com/repos/Dbz/Algorithms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Dbz/Algorithms/statuses/{sha}","languages_url":"https://api.github.com/repos/Dbz/Algorithms/languages","stargazers_url":"https://api.github.com/repos/Dbz/Algorithms/stargazers","contributors_url":"https://api.github.com/repos/Dbz/Algorithms/contributors","subscribers_url":"https://api.github.com/repos/Dbz/Algorithms/subscribers","subscription_url":"https://api.github.com/repos/Dbz/Algorithms/subscription","commits_url":"https://api.github.com/repos/Dbz/Algorithms/commits{/sha}","git_commits_url":"https://api.github.com/repos/Dbz/Algorithms/git/commits{/sha}","comments_url":"https://api.github.com/repos/Dbz/Algorithms/comments{/number}","issue_comment_url":"https://api.github.com/repos/Dbz/Algorithms/issues/comments{/number}","contents_url":"https://api.github.com/repos/Dbz/Algorithms/contents/{+path}","compare_url":"https://api.github.com/repos/Dbz/Algorithms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Dbz/Algorithms/merges","archive_url":"https://api.github.com/repos/Dbz/Algorithms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Dbz/Algorithms/downloads","issues_url":"https://api.github.com/repos/Dbz/Algorithms/issues{/number}","pulls_url":"https://api.github.com/repos/Dbz/Algorithms/pulls{/number}","milestones_url":"https://api.github.com/repos/Dbz/Algorithms/milestones{/number}","notifications_url":"https://api.github.com/repos/Dbz/Algorithms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Dbz/Algorithms/labels{/name}","releases_url":"https://api.github.com/repos/Dbz/Algorithms/releases{/id}","created_at":"2014-12-29T04:21:51Z","updated_at":"2015-12-22T09:23:55Z","pushed_at":"2015-12-29T19:51:59Z","git_url":"git://github.com/Dbz/Algorithms.git","ssh_url":"git@github.com:Dbz/Algorithms.git","clone_url":"https://github.com/Dbz/Algorithms.git","svn_url":"https://github.com/Dbz/Algorithms","homepage":"","size":135,"stargazers_count":7,"watchers_count":7,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":7,"default_branch":"master"}},"base":{"label":"Dbz:master","ref":"master","sha":"47513ab2d2f5bd0f5e7d02530cf5510ec45e692d","user":{"login":"Dbz","id":628429,"avatar_url":"https://avatars.githubusercontent.com/u/628429?v=3","gravatar_id":"","url":"https://api.github.com/users/Dbz","html_url":"https://github.com/Dbz","followers_url":"https://api.github.com/users/Dbz/followers","following_url":"https://api.github.com/users/Dbz/following{/other_user}","gists_url":"https://api.github.com/users/Dbz/gists{/gist_id}","starred_url":"https://api.github.com/users/Dbz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dbz/subscriptions","organizations_url":"https://api.github.com/users/Dbz/orgs","repos_url":"https://api.github.com/users/Dbz/repos","events_url":"https://api.github.com/users/Dbz/events{/privacy}","received_events_url":"https://api.github.com/users/Dbz/received_events","type":"User","site_admin":false},"repo":{"id":28580097,"name":"Algorithms","full_name":"Dbz/Algorithms","owner":{"login":"Dbz","id":628429,"avatar_url":"https://avatars.githubusercontent.com/u/628429?v=3","gravatar_id":"","url":"https://api.github.com/users/Dbz","html_url":"https://github.com/Dbz","followers_url":"https://api.github.com/users/Dbz/followers","following_url":"https://api.github.com/users/Dbz/following{/other_user}","gists_url":"https://api.github.com/users/Dbz/gists{/gist_id}","starred_url":"https://api.github.com/users/Dbz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dbz/subscriptions","organizations_url":"https://api.github.com/users/Dbz/orgs","repos_url":"https://api.github.com/users/Dbz/repos","events_url":"https://api.github.com/users/Dbz/events{/privacy}","received_events_url":"https://api.github.com/users/Dbz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Dbz/Algorithms","description":"Data Structures & Algorithms","fork":false,"url":"https://api.github.com/repos/Dbz/Algorithms","forks_url":"https://api.github.com/repos/Dbz/Algorithms/forks","keys_url":"https://api.github.com/repos/Dbz/Algorithms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Dbz/Algorithms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Dbz/Algorithms/teams","hooks_url":"https://api.github.com/repos/Dbz/Algorithms/hooks","issue_events_url":"https://api.github.com/repos/Dbz/Algorithms/issues/events{/number}","events_url":"https://api.github.com/repos/Dbz/Algorithms/events","assignees_url":"https://api.github.com/repos/Dbz/Algorithms/assignees{/user}","branches_url":"https://api.github.com/repos/Dbz/Algorithms/branches{/branch}","tags_url":"https://api.github.com/repos/Dbz/Algorithms/tags","blobs_url":"https://api.github.com/repos/Dbz/Algorithms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Dbz/Algorithms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Dbz/Algorithms/git/refs{/sha}","trees_url":"https://api.github.com/repos/Dbz/Algorithms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Dbz/Algorithms/statuses/{sha}","languages_url":"https://api.github.com/repos/Dbz/Algorithms/languages","stargazers_url":"https://api.github.com/repos/Dbz/Algorithms/stargazers","contributors_url":"https://api.github.com/repos/Dbz/Algorithms/contributors","subscribers_url":"https://api.github.com/repos/Dbz/Algorithms/subscribers","subscription_url":"https://api.github.com/repos/Dbz/Algorithms/subscription","commits_url":"https://api.github.com/repos/Dbz/Algorithms/commits{/sha}","git_commits_url":"https://api.github.com/repos/Dbz/Algorithms/git/commits{/sha}","comments_url":"https://api.github.com/repos/Dbz/Algorithms/comments{/number}","issue_comment_url":"https://api.github.com/repos/Dbz/Algorithms/issues/comments{/number}","contents_url":"https://api.github.com/repos/Dbz/Algorithms/contents/{+path}","compare_url":"https://api.github.com/repos/Dbz/Algorithms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Dbz/Algorithms/merges","archive_url":"https://api.github.com/repos/Dbz/Algorithms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Dbz/Algorithms/downloads","issues_url":"https://api.github.com/repos/Dbz/Algorithms/issues{/number}","pulls_url":"https://api.github.com/repos/Dbz/Algorithms/pulls{/number}","milestones_url":"https://api.github.com/repos/Dbz/Algorithms/milestones{/number}","notifications_url":"https://api.github.com/repos/Dbz/Algorithms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Dbz/Algorithms/labels{/name}","releases_url":"https://api.github.com/repos/Dbz/Algorithms/releases{/id}","created_at":"2014-12-29T04:21:51Z","updated_at":"2015-12-22T09:23:55Z","pushed_at":"2015-12-29T19:51:59Z","git_url":"git://github.com/Dbz/Algorithms.git","ssh_url":"git@github.com:Dbz/Algorithms.git","clone_url":"https://github.com/Dbz/Algorithms.git","svn_url":"https://github.com/Dbz/Algorithms","homepage":"","size":135,"stargazers_count":7,"watchers_count":7,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Dbz/Algorithms/pulls/10"},"html":{"href":"https://github.com/Dbz/Algorithms/pull/10"},"issue":{"href":"https://api.github.com/repos/Dbz/Algorithms/issues/10"},"comments":{"href":"https://api.github.com/repos/Dbz/Algorithms/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/Dbz/Algorithms/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/Dbz/Algorithms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Dbz/Algorithms/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/Dbz/Algorithms/statuses/79b772b057073d036828e16ed7f1465bf6f9e89c"}}}}