{"action":"created","comment":{"url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/pulls/comments/93750258","pull_request_review_id":14284433,"id":93750258,"diff_hunk":"@@ -93,6 +110,87 @@ def compute(departure_station, arrival_station, departure_time)\n \n     print_result(arrival_station)\n   end\n+\n+  # Compute and print the solution with the least connection\n+  def compute_least_connection_route(departure_station, arrival_station, departure_time)\n+    final_list = Array.new\n+    # init our arrival station\n+    @arrival_station = arrival_station\n+    # launch our process to find the shortest route\n+    permute(timetable.connections, final_list, departure_station, departure_time)\n+    # print the solution\n+    print_route(route_with_least_connection)\n+  end\n+\n+\n+  # Semi-recursive method to compute all the possible route solution\n+  # potentially very costly but optimized to only compute potential minimum route solution and not all the possible route\n+  def permute(to_permute, final_list, station, timestamp)\n+    # here we know that our final list contain a route which start from the departure station and\n+    # arrive to the arrival station\n+    if not final_list.empty? and final_list.last.arrival_station == arrival_station","path":"csa.rb","position":null,"original_position":58,"commit_id":"1f0de4246edc56b20677684ceb827bf05d48212d","original_commit_id":"4c428ed28268c1c546a46310821d4894155e5570","user":{"login":"FlorianDoublet","id":10435273,"avatar_url":"https://avatars.githubusercontent.com/u/10435273?v=3","gravatar_id":"","url":"https://api.github.com/users/FlorianDoublet","html_url":"https://github.com/FlorianDoublet","followers_url":"https://api.github.com/users/FlorianDoublet/followers","following_url":"https://api.github.com/users/FlorianDoublet/following{/other_user}","gists_url":"https://api.github.com/users/FlorianDoublet/gists{/gist_id}","starred_url":"https://api.github.com/users/FlorianDoublet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FlorianDoublet/subscriptions","organizations_url":"https://api.github.com/users/FlorianDoublet/orgs","repos_url":"https://api.github.com/users/FlorianDoublet/repos","events_url":"https://api.github.com/users/FlorianDoublet/events{/privacy}","received_events_url":"https://api.github.com/users/FlorianDoublet/received_events","type":"User","site_admin":false},"body":"Je l'ai corrigé dans ce commit : https://github.com/FlorianDoublet/ruby-csa-challenge/commit/1f0de4246edc56b20677684ceb827bf05d48212d","created_at":"2016-12-23T10:28:54Z","updated_at":"2016-12-23T10:28:55Z","html_url":"https://github.com/FlorianDoublet/ruby-csa-challenge/pull/1#discussion_r93750258","pull_request_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/pulls/comments/93750258"},"html":{"href":"https://github.com/FlorianDoublet/ruby-csa-challenge/pull/1#discussion_r93750258"},"pull_request":{"href":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/pulls/1","id":99131236,"html_url":"https://github.com/FlorianDoublet/ruby-csa-challenge/pull/1","diff_url":"https://github.com/FlorianDoublet/ruby-csa-challenge/pull/1.diff","patch_url":"https://github.com/FlorianDoublet/ruby-csa-challenge/pull/1.patch","issue_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/issues/1","number":1,"state":"open","locked":false,"title":"Compute route with the least connections","user":{"login":"pocman","id":1695808,"avatar_url":"https://avatars.githubusercontent.com/u/1695808?v=3","gravatar_id":"","url":"https://api.github.com/users/pocman","html_url":"https://github.com/pocman","followers_url":"https://api.github.com/users/pocman/followers","following_url":"https://api.github.com/users/pocman/following{/other_user}","gists_url":"https://api.github.com/users/pocman/gists{/gist_id}","starred_url":"https://api.github.com/users/pocman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pocman/subscriptions","organizations_url":"https://api.github.com/users/pocman/orgs","repos_url":"https://api.github.com/users/pocman/repos","events_url":"https://api.github.com/users/pocman/events{/privacy}","received_events_url":"https://api.github.com/users/pocman/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-12-22T16:23:47Z","updated_at":"2016-12-23T10:28:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f2c4ebe6c90493963d62795e0de721f4fa8db72c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/pulls/1/commits","review_comments_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/pulls/1/comments","review_comment_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/pulls/comments{/number}","comments_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/issues/1/comments","statuses_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/statuses/1f0de4246edc56b20677684ceb827bf05d48212d","head":{"label":"FlorianDoublet:compute-route-with-the-least-connections","ref":"compute-route-with-the-least-connections","sha":"1f0de4246edc56b20677684ceb827bf05d48212d","user":{"login":"FlorianDoublet","id":10435273,"avatar_url":"https://avatars.githubusercontent.com/u/10435273?v=3","gravatar_id":"","url":"https://api.github.com/users/FlorianDoublet","html_url":"https://github.com/FlorianDoublet","followers_url":"https://api.github.com/users/FlorianDoublet/followers","following_url":"https://api.github.com/users/FlorianDoublet/following{/other_user}","gists_url":"https://api.github.com/users/FlorianDoublet/gists{/gist_id}","starred_url":"https://api.github.com/users/FlorianDoublet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FlorianDoublet/subscriptions","organizations_url":"https://api.github.com/users/FlorianDoublet/orgs","repos_url":"https://api.github.com/users/FlorianDoublet/repos","events_url":"https://api.github.com/users/FlorianDoublet/events{/privacy}","received_events_url":"https://api.github.com/users/FlorianDoublet/received_events","type":"User","site_admin":false},"repo":{"id":77128917,"name":"ruby-csa-challenge","full_name":"FlorianDoublet/ruby-csa-challenge","owner":{"login":"FlorianDoublet","id":10435273,"avatar_url":"https://avatars.githubusercontent.com/u/10435273?v=3","gravatar_id":"","url":"https://api.github.com/users/FlorianDoublet","html_url":"https://github.com/FlorianDoublet","followers_url":"https://api.github.com/users/FlorianDoublet/followers","following_url":"https://api.github.com/users/FlorianDoublet/following{/other_user}","gists_url":"https://api.github.com/users/FlorianDoublet/gists{/gist_id}","starred_url":"https://api.github.com/users/FlorianDoublet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FlorianDoublet/subscriptions","organizations_url":"https://api.github.com/users/FlorianDoublet/orgs","repos_url":"https://api.github.com/users/FlorianDoublet/repos","events_url":"https://api.github.com/users/FlorianDoublet/events{/privacy}","received_events_url":"https://api.github.com/users/FlorianDoublet/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/FlorianDoublet/ruby-csa-challenge","description":"Extention of the csa challenge in rubyfrom https://github.com/trainline-eu/csa-challenge.","fork":false,"url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge","forks_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/forks","keys_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/teams","hooks_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/hooks","issue_events_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/issues/events{/number}","events_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/events","assignees_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/assignees{/user}","branches_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/branches{/branch}","tags_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/tags","blobs_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/git/refs{/sha}","trees_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/statuses/{sha}","languages_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/languages","stargazers_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/stargazers","contributors_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/contributors","subscribers_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/subscribers","subscription_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/subscription","commits_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/commits{/sha}","git_commits_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/git/commits{/sha}","comments_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/comments{/number}","issue_comment_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/issues/comments{/number}","contents_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/contents/{+path}","compare_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/merges","archive_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/downloads","issues_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/issues{/number}","pulls_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/pulls{/number}","milestones_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/milestones{/number}","notifications_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/labels{/name}","releases_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/releases{/id}","deployments_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/deployments","created_at":"2016-12-22T08:53:34Z","updated_at":"2016-12-22T15:58:24Z","pushed_at":"2016-12-23T10:27:32Z","git_url":"git://github.com/FlorianDoublet/ruby-csa-challenge.git","ssh_url":"git@github.com:FlorianDoublet/ruby-csa-challenge.git","clone_url":"https://github.com/FlorianDoublet/ruby-csa-challenge.git","svn_url":"https://github.com/FlorianDoublet/ruby-csa-challenge","homepage":null,"size":29737,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"FlorianDoublet:master","ref":"master","sha":"cae4c6ac79e2240a6a4bb7d74f45b1d59d4824eb","user":{"login":"FlorianDoublet","id":10435273,"avatar_url":"https://avatars.githubusercontent.com/u/10435273?v=3","gravatar_id":"","url":"https://api.github.com/users/FlorianDoublet","html_url":"https://github.com/FlorianDoublet","followers_url":"https://api.github.com/users/FlorianDoublet/followers","following_url":"https://api.github.com/users/FlorianDoublet/following{/other_user}","gists_url":"https://api.github.com/users/FlorianDoublet/gists{/gist_id}","starred_url":"https://api.github.com/users/FlorianDoublet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FlorianDoublet/subscriptions","organizations_url":"https://api.github.com/users/FlorianDoublet/orgs","repos_url":"https://api.github.com/users/FlorianDoublet/repos","events_url":"https://api.github.com/users/FlorianDoublet/events{/privacy}","received_events_url":"https://api.github.com/users/FlorianDoublet/received_events","type":"User","site_admin":false},"repo":{"id":77128917,"name":"ruby-csa-challenge","full_name":"FlorianDoublet/ruby-csa-challenge","owner":{"login":"FlorianDoublet","id":10435273,"avatar_url":"https://avatars.githubusercontent.com/u/10435273?v=3","gravatar_id":"","url":"https://api.github.com/users/FlorianDoublet","html_url":"https://github.com/FlorianDoublet","followers_url":"https://api.github.com/users/FlorianDoublet/followers","following_url":"https://api.github.com/users/FlorianDoublet/following{/other_user}","gists_url":"https://api.github.com/users/FlorianDoublet/gists{/gist_id}","starred_url":"https://api.github.com/users/FlorianDoublet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FlorianDoublet/subscriptions","organizations_url":"https://api.github.com/users/FlorianDoublet/orgs","repos_url":"https://api.github.com/users/FlorianDoublet/repos","events_url":"https://api.github.com/users/FlorianDoublet/events{/privacy}","received_events_url":"https://api.github.com/users/FlorianDoublet/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/FlorianDoublet/ruby-csa-challenge","description":"Extention of the csa challenge in rubyfrom https://github.com/trainline-eu/csa-challenge.","fork":false,"url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge","forks_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/forks","keys_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/teams","hooks_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/hooks","issue_events_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/issues/events{/number}","events_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/events","assignees_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/assignees{/user}","branches_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/branches{/branch}","tags_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/tags","blobs_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/git/refs{/sha}","trees_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/statuses/{sha}","languages_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/languages","stargazers_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/stargazers","contributors_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/contributors","subscribers_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/subscribers","subscription_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/subscription","commits_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/commits{/sha}","git_commits_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/git/commits{/sha}","comments_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/comments{/number}","issue_comment_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/issues/comments{/number}","contents_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/contents/{+path}","compare_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/merges","archive_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/downloads","issues_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/issues{/number}","pulls_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/pulls{/number}","milestones_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/milestones{/number}","notifications_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/labels{/name}","releases_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/releases{/id}","deployments_url":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/deployments","created_at":"2016-12-22T08:53:34Z","updated_at":"2016-12-22T15:58:24Z","pushed_at":"2016-12-23T10:27:32Z","git_url":"git://github.com/FlorianDoublet/ruby-csa-challenge.git","ssh_url":"git@github.com:FlorianDoublet/ruby-csa-challenge.git","clone_url":"https://github.com/FlorianDoublet/ruby-csa-challenge.git","svn_url":"https://github.com/FlorianDoublet/ruby-csa-challenge","homepage":null,"size":29737,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/pulls/1"},"html":{"href":"https://github.com/FlorianDoublet/ruby-csa-challenge/pull/1"},"issue":{"href":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/issues/1"},"comments":{"href":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/FlorianDoublet/ruby-csa-challenge/statuses/1f0de4246edc56b20677684ceb827bf05d48212d"}}}}
{"actor":{"display_login":"FlorianDoublet"}}