{"id":19454838,"url":"https://github.com/fancellu/graphx-citymap","last_synced_at":"2025-04-25T05:30:40.441Z","repository":{"id":71450614,"uuid":"43742612","full_name":"fancellu/graphx-citymap","owner":"fancellu","description":"CityMap coding test plus 3 solutions, 1 with Spark/GraphX","archived":false,"fork":false,"pushed_at":"2015-12-11T14:53:08.000Z","size":0,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-03T16:52:13.247Z","etag":null,"topics":["graphx","scalatest","spark"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fancellu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-06T09:57:38.000Z","updated_at":"2025-04-02T12:01:43.000Z","dependencies_parsed_at":"2023-04-12T07:46:58.246Z","dependency_job_id":null,"html_url":"https://github.com/fancellu/graphx-citymap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fancellu%2Fgraphx-citymap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fancellu%2Fgraphx-citymap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fancellu%2Fgraphx-citymap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fancellu%2Fgraphx-citymap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fancellu","download_url":"https://codeload.github.com/fancellu/graphx-citymap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250760582,"owners_count":21482831,"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","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":["graphx","scalatest","spark"],"created_at":"2024-11-10T17:12:10.843Z","updated_at":"2025-04-25T05:30:40.137Z","avatar_url":"https://github.com/fancellu.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CityMap coding test plus 3 solutions #\n\n[![Build Status](https://travis-ci.org/fancellu/graphx-citymap.svg?branch=master)](https://travis-ci.org/fancellu/graphx-citymap)\n\nThe problem is to provide an algorithm to calculate if a journey is possible for a series of locations in a city, connected by roads. You need to write an implementation for a class as follows:\n\n    /**\n     * @param routesAndLocations A String specification of the \n     * routes between locations. A comma-separated list\n     * of roads and paths between locations defined as \n     * [startLocation][type][endLocation] e.g.\n     *\n     * \"a-b\" represents two locations, where travel is only possible \n     *   from a to b on foot \n     * \"a-b,b-a\" represents two locations, where travel \n     *   is possible in both directions on foot\n     * \"a=b,b=c,c=a\" represents a triangular one-way road travelling \n     *   from a, through b and c, and finally back to a.\n     *\n     * Routes can be of two types:\n     * - Paths (accessible on foot only)\n     * = Roads (accessible on foot \u0026 by car)  \n     */\n    class CityMap(routesAndLocations: String) {\n    \n      /**\n       * Determine whether a journey from the startLocation to the\n       * destinationLocation can be made, based on the available routes\n       * and whether on foot (onFoot=true), or by car (onFoot=false)\n       */\n      def isJourneyPossible(startLocation: String, destinationLocation: String, onFoot: Boolean): Boolean = ???\n    \n    }\n\n\n\n## Solutions ##\n\n3 solutions are supplied, first 2 in pure Scala, the 3rd using Spark+GraphX\n\n[CityMapA](../../tree/master/src/main/scala/com/felstar/citymap/CityMapA.scala)\n\n[CityMapB](../../tree/master/src/main/scala/com/felstar/citymap/CityMapB.scala)\n\n[CityMapGraphX](../../tree/master/src/main/scala/com/felstar/citymap/CityMapGraphX.scala)\n\nalong with ScalaTest to test them all\n\n[CityMapTest](../../tree/master/src/test/scala/com/felstar/citymap/CityMapTest.scala) \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffancellu%2Fgraphx-citymap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffancellu%2Fgraphx-citymap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffancellu%2Fgraphx-citymap/lists"}