Git Product home page Git Product logo

algorithm-analysis-lab-solutions's Introduction

Algorithm assignments monorepo

BTH004 Algorithm Analysis laboratory assignments solutions.

Requirements

It is a monorepo based on bun. Before get started, instead of NodeJS, you should use your package manager global install bun.

Run

Before executing running commands, install the dependencies.

$ bun install

Then run the index file in root repo with --algorithm and --input arguments passed.

# All available --algorithm values can be found in package.json
$ bun index.ts --algorithm greedy --input ./input/case_1.json

# Alternatively using alias
$ bun greedy --input ./input/case_1.json

Note

Two assignments input cases are provided in input/, you can refer the type of them

Debug

You should debug for the index file /index.ts by passing some arguments mentioned in previous section.

If you use VSCode or VSCodium, you can easily start bun debug by adding this configuration in .vscode/launch.json. Looking the example for debugging neighbor search with input file case_6.json

{
  "type": "bun",
  "request": "launch",
  "name": "Debug neighbor search",
  "program": "${workspaceFolder}/index.ts",
  "cwd": "${workspaceFolder}",
  "stopOnEntry": false,
  "watchMode": false,
  "internalConsoleOptions": "neverOpen",
  "args": [
    "--algorithm",
    "neighborSearch",
    "--input",
    "${workspaceFolder}/input/case_1.json"
  ]
},

algorithm-analysis-lab-solutions's People

Contributors

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