Giter Site home page Giter Site logo

ormucotask's Introduction

OrmucoTask

Hi,This is my sumitted answers for the tech test round.

The core file for each tasks are: Assignment1.java (QuestionA) Assignment2.java (QuestionB) GeoRedisLruCache.java(QuestionC)

If you wanna check the the runnable code. Please download respective folders and find entry src/main/java at each folders.

##Explanation for each answer:

1.QuestionA Using method called isOverlappedOrNot which takes four integer representing two intervals and use actual logic to check the possiblity of intervals overlapping.

2.QuestionB Assignment2 contains several methods for comparing and processing String in a custom way, taking into account absolute values and signs.

As for each method:

  • isValidInput Method uses regular expressions to check whether the input string consists of digits, dots. f the input string matches the pattern, it returns true; otherwise,it return false;

  • compareAbsValue Method, it splits each input string using dots as separators. It would determine maximum length of the two arrays and checks if either of the input strings has more than two parts (indicating an invalid input) and returns -999. It then compares the absolute values of corresponding parts of the input strings (up to the length of len) and returns value(-1,1,0) according to comparing logic.

  • isPositive method takes two version strings and checks if if the input string starts with a hyphen or not.

  • compareProcess method is the one integrated other checking method.It would two version string,namely input1 and input2. First it would check if either of the input strings is not valid according to isValidInput method.Then it would check input string using compareAbsValue to compare absolute value. Finally, it would return the comparison result.

3.QuestionC

GeoRedisLruCache combine the functionality of a Local LRU cached and a distributed cache using Redis. It handles caching and refreshing data in both the local cache and Redis while considering error handling for potential issues that may arise during cache operations.This LRU structure used LinkedHashMap to ensure the write and retrieve quickly as the time complexity of this algorithem is O(1). Some schedulers are called to remove the expired data periodically. we The explanations for each method are annotated in codes, please kindly check.

If there is any question, please free to reach me via [email protected] or Tel num 226-789-6981. Jongee Hsu/Xiongyi Xu

ormucotask's People

Contributors

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