{"id":15985489,"url":"https://github.com/ioleo/code-kata-acyclic-graph-distance","last_synced_at":"2025-09-05T02:48:46.165Z","repository":{"id":73269701,"uuid":"80474993","full_name":"ioleo/code-kata-acyclic-graph-distance","owner":"ioleo","description":"Acyclic graph distance code kata in Scala.","archived":false,"fork":false,"pushed_at":"2017-02-02T23:27:20.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-11T00:05:34.868Z","etag":null,"topics":["code-kata"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ioleo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-30T23:39:05.000Z","updated_at":"2017-02-03T10:42:39.000Z","dependencies_parsed_at":"2023-02-26T11:45:19.231Z","dependency_job_id":null,"html_url":"https://github.com/ioleo/code-kata-acyclic-graph-distance","commit_stats":{"total_commits":3,"total_committers":2,"mean_commits":1.5,"dds":"0.33333333333333337","last_synced_commit":"73901657d8bf5183d6bf58d87157d737d766fea5"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ioleo/code-kata-acyclic-graph-distance","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ioleo%2Fcode-kata-acyclic-graph-distance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ioleo%2Fcode-kata-acyclic-graph-distance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ioleo%2Fcode-kata-acyclic-graph-distance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ioleo%2Fcode-kata-acyclic-graph-distance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ioleo","download_url":"https://codeload.github.com/ioleo/code-kata-acyclic-graph-distance/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ioleo%2Fcode-kata-acyclic-graph-distance/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273703695,"owners_count":25153001,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-kata"],"created_at":"2024-10-08T02:22:07.587Z","updated_at":"2025-09-05T02:48:46.143Z","avatar_url":"https://github.com/ioleo.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# code-kata-acyclic-graph-distance\n\nYou are given an array representing M cities connected with M-1 roads. \nCompute the amount of cities reachable in 1 to M-1 steps from specified start point (the capital city).\n\n```\nval input: Array[Int] = Array(9, 1, 4, 9, 0, 4, 8, 9, 0, 1)\n```\n\nWhich represents following information:\n\n* City #0 has direct road to city #9\n* City #1 has direct road with itself (special case -\u003e this is the capital city)\n* City #2 has direct road to city #4\n* City #3 has direct road to city #9\n* ...\n* City #8 has direct road to city #0\n* City #9 has direct road to city #1\n\n\u003e Note: the \"from\" city number is the index of an element, the \"to\" city number is the value of an element.\n\n```\nval expectedOutput: Array[Int] = Array(1, 3, 2, 3, 0, 0, 0, 0, 0)\n```\n\nWhich represents following information:\n\n* There are 1 cities at reachable in 1 steps\n* There are 3 cities at reachable in 2 steps\n* There are 2 cities at reachable in 3 steps\n* There are 3 cities at reachable in 4 steps\n* ...\n* There are 0 cities at reachable in 8 steps\n* There are 0 cities at reachable in 9 steps\n\n\u003e Note: the \"number of steps\" is the index of an element plus one, the \"number of cities\" at given distance is the value of an element.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fioleo%2Fcode-kata-acyclic-graph-distance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fioleo%2Fcode-kata-acyclic-graph-distance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fioleo%2Fcode-kata-acyclic-graph-distance/lists"}