GithubHelp home page GithubHelp logo

statebordergraph's Introduction

State Border Graph

This Java program utilizes an undirected graph data structure to represent the common borders between states. The program reads input from the file in.txt, which contains pairs of states that share a common border. Each state is represented as a vertex in the graph, and an edge is added between two states if they share a border.

Input data

This file provides a list of state pairs that have common borders. By parsing this input, the program constructs a graph that accurately represents the bordering relationships between states.

Graph Representation

The graph used in this program is undirected, meaning that if State A shares a border with State B, then State B also shares a border with State A. Each state is mapped to an integer vertex within the graph, creating a comprehensive representation of the connectivity between states.

Output

The program generates an output that lists each state along with the states it shares a border with. The output format is as follows:

Alabama: Florida, Georgia, Mississippi, Mississippi, Tennessee
Arizona: California, Colorado, Nevada, New Mexico, Utah

The output is organized alphabetically by state and provides a clear and concise view of the neighboring states for each state in the dataset.

statebordergraph's People

Contributors

codyafingerson avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.