{"id":16923107,"url":"https://github.com/zhaohuabing/shortest-path-in-grid-with-obstacles-java","last_synced_at":"2025-04-05T13:41:55.883Z","repository":{"id":145114506,"uuid":"183992946","full_name":"zhaohuabing/shortest-path-in-grid-with-obstacles-java","owner":"zhaohuabing","description":"Find the shortest path between two points in a unweighted grid with obstacles","archived":false,"fork":false,"pushed_at":"2023-07-22T04:21:14.000Z","size":7,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-11T09:47:49.969Z","etag":null,"topics":["bfs","breadth-first-search","grid","java","obstacle"],"latest_commit_sha":null,"homepage":null,"language":"Java","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/zhaohuabing.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":"2019-04-29T03:24:00.000Z","updated_at":"2020-07-20T11:43:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"fa1be1ba-843e-4b63-ae91-9a9f16148edc","html_url":"https://github.com/zhaohuabing/shortest-path-in-grid-with-obstacles-java","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/zhaohuabing%2Fshortest-path-in-grid-with-obstacles-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhaohuabing%2Fshortest-path-in-grid-with-obstacles-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhaohuabing%2Fshortest-path-in-grid-with-obstacles-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhaohuabing%2Fshortest-path-in-grid-with-obstacles-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhaohuabing","download_url":"https://codeload.github.com/zhaohuabing/shortest-path-in-grid-with-obstacles-java/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247345707,"owners_count":20924098,"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":["bfs","breadth-first-search","grid","java","obstacle"],"created_at":"2024-10-13T19:57:52.763Z","updated_at":"2025-04-05T13:41:55.875Z","avatar_url":"https://github.com/zhaohuabing.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# shortest-path-in-a-grid-with-obstacles-java\nFind the shortest path between two points in a unweighted grid with obstacles\n\nBased on breadth first searchalgorithm \n\ntest case\n\n* 9 marks the two points between which we need to find the path \n* 0 marks the obstacles which the path can't go through \n* 1 marks the noraml points which the path can go through\n* the length between any two adjacent points is 1\n\n```\n      9'''''|'''''|'''''|''''':'''''|'''''|'''''`.\n      |     |     |     |     |     |     |      |\n      |     |     |     |     |     |     |      |\n      |'''''0'''''|'''''|'''''|'''''0'''''|'''''''\n      |     |     |     |     |     |     |      |\n      |     |     |     |     |     |     |      |\n      |.....|.....|.....0.....|.....|.....|......|\n      |     |     |     |     |     |     |      |\n      |     |     |     |     |     |     |      |\n      0-----+-----0-----+-----0-----+-----+------|\n      |     |     |     |     |     |     |      |\n      |     |     |     |     |     |     |      |\n      |'''''|'''''|'''''|'''''|'''''9'''''|''''''|\n      |     |     |     |     |     |     |      |\n      '     |     |     |     |     |     |      |\n      `-----------0-----'-----'-----'-----'------'\n\n```\n\nThe above graph can be represented by a two-dimensional array like this:\n\n```\n      9 1 1 1 1 1 1 1\n      1 0 1 1 1 0 1 1 \n      1 1 1 0 1 1 1 1\n      0 1 0 1 0 1 1 1\n      1 1 1 1 1 9 1 1\n      1 1 0 1 1 1 1 1\n```\n\nThere are two shortest paths between these two points, one is marked with *, the other is marked with #. \n\n```\n      9 # # # # 1 1 1\n      * 0 1 1 # 0 1 1 \n      * * 1 0 # # 1 1\n      0 * 0 1 0 # 1 1\n      1 * * * * 9 1 1\n      1 1 0 1 1 1 1 1\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhaohuabing%2Fshortest-path-in-grid-with-obstacles-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhaohuabing%2Fshortest-path-in-grid-with-obstacles-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhaohuabing%2Fshortest-path-in-grid-with-obstacles-java/lists"}