Git Product home page Git Product logo

softeng250-hw4's Introduction

SOFTENG 250 Homework 4 for University of Auckland Software Engineering

Various processing of directed graphs

Given a directed graph input, G, the code should do the following:
1.  Output all the vertices that have the same in and out degrees
2.  Output the average in-degree and the average out-degree of vertices
3.  Test if G has a cycle
4.  If G has a cycle, then the code should output at least one cycle, 
    else the code should output topological ordering of G
5.  Test if G has at most 3 cycles

See example inputs and outputs in the hw4.pdf file and in the .txt files

How Do I Use This?

You must have a JRE (Java Runtime Environment) installed. You can download it here

First Method

  1. Download the executable softeng250-hw4.jar file
  2. Open up the Command Prompt (Windows) or the Terminal (Mac)
  3. Navigate to the directory where this file is located
    • Use cd 'insertfolderpath' without the quotation marks
  4. Use java -jar softeng250-hw4.jar to execute the file

Second Method

  1. Download this repository
  2. Extract the .zip file into a directory of your choice
  3. Open up the Command Prompt (Windows) or the Terminal (Mac)
  4. Navigate to the extracted folder softeng250-hw4-master
    • Use cd 'insertfolderpath' without the quotation marks
  5. Use javac -cp ./ src/hw4/Main.java
  6. Use java src/hw4/Main

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.