GithubHelp home page GithubHelp logo

suprnation's Introduction

Suprnation Coding Exercise

This program will find minimum/maximum paths for triangles and print them out to standard output.

How to run

There are a couple of ways in which you can choose to run this coding exercise.

  1. Executing the jar file included in the top-level directory providing the input:
cat << EOF | java -jar MinTrianglePath.jar
  1. Executing the jar file with no input will trigger you to provide a triangle:
java -jar MinTrianglePath.jar
  1. As an sbt main class:
sbt "runMain suprnation.TriangleApp"
  1. If you wish to generate your own version of the jar you can do so by running:
sbt "assembly"
java -jar target/scala-2.13/MinTrianglePath.jar

Just enter a blank line whenever you wish to stop providing input.

Tests

In order to run the tests:

sbt test

Notes

I had initially solved it by traversing the entire input once it was fully known. After reading from the file I had the idea to stream the lines and compute the Paths as new lines were processed. I got to implement the solution processing one line at a time, but did not get around to use any streaming tools.

suprnation's People

Contributors

capsj 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.