Git Product home page Git Product logo

samreen-ansari-adventurer-journey-be's Introduction

Adventurer Journey - Back End

Please complete the story below and create a program to solve the problem. Commit any work back to the remote no later than 48 hours before the next interview.

Please use whatever languages, references and tooling you would like to complete the story.

Story Instructions

You are an adventurer standing in the center of a map facing North, and you’re trying to weave through the terrain to your final destination. You have the directions to your destination indicating the number of steps and the direction to travel.

Adventurer Path & Instructions - ./Adventurer Path.md

Given the Path Instructions above, programmatically parse the instructions and determine what is the Euclidean (straight line) distance from your starting point to the destination in steps?

Tech Notes:

  • Use whatever languages, references and tooling you would like.
  • Provide any needed instructions to run program.
  • Do not round to the nearest step.
  • After program executes the answer should be returned.

Developer Notes

Prerequisite: Have Java 8+ installed on the System

Instructions to Run Program using the JAR file

  1. Clone the repository
  2. Navigate to the root directory
  3. Run the following command: java -jar adventurer.jar

Instructions to Build and Run Program using the source code

  1. Clone the repository
  2. Navigate to the directory adventurer
  3. Run the following command: javac -d bin src/main/Main.java src/main/PathHelper.java
  4. Navigate to the directory adventurer/bin
  5. Run the following command: java Main

Tests

  1. Tests are located in the directory adventurer/src/test

Assumptions

  1. The adventurer starts at the origin (0, 0) facing North.
  2. The adventurer turns to face the direction in which they will be moving.
  3. The distance can be an integer or a decimal number.
  4. If an invalid direction or no distance is provided, it is skipped, assuming a distance of 0.
  5. The directions are capital letters.

samreen-ansari-adventurer-journey-be's People

Contributors

solaredge3 avatar samdaqueen 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.