Giter Club home page Giter Club logo

bandp_rust_test's Introduction

bandp_rust_test

All problems are written in Rust.

I put emphasis on making sure the code is strongly typed. Therefore all inputs needs to be safely validated and convereted into their own type. Following this design, the main functions have no concerns over the validity of the data given to them.

Problem 1: Boss Baby's Revenge

This task uses O(N) time complexity, by iterating over peekable input characters to determine shoot-retalitate sequence. If an invalid sequence is detected negative result is returned early. Otherwise will continue to read until no characters left, then positive result is returned.

The main function is named check_boss_behavior. Read more here

Problem 2: Superman's Chicken Rescue

This task uses O(N) time complexity. I brute force the roof tests over every chicken positions in parallel. Then finding the maximum result from the threads.

The main function is named max_chicken_protected. Read more here

Problem 3: Transaction Broadcasting And Monitoring Client

For this task, I found myself unable to get valid response from the broadcast endpoint. So I can't really test the APIs. But I assume the objective of the task is about documentation and structures. So I only focus on that.

Input structures are designed solely from my imagination. Please pay it no mind.

Please run cargo doc to generate documents.

The main function is named broadcast. Read more on broadcasting here

The main function is named monitor. Read more on monitoring here

bandp_rust_test's People

Contributors

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