Code Monkey home page Code Monkey logo

looqbox-backend-challenge's Introduction

Looqbox Backend Challenge

Looqbox

Challenge

First, sorting by the initial letters of the pokemons is performed. Then, the order by length of the pokemon names is performed. If there are pokemon names of equal size, they will be sorted alphabetically.

Just an example response:

{
    "results": [
        {
            "name": "beedrill",
        },
        {
            "name": "blastoise",
        },
        {
            "name": "bulbasaur",
        },
        {
            "name": "butterfree",
        },
        {
            "name": "caterpie",
        },
        {
            "name": "charizard",
        },
        {
            "name": "charmander",
        },
        {
            "name": "charmeleon",
        },
    ] 
}


Endpoint:

localhost:8080/pokemon?q

Docker

./gradlew bootjar
docker build -t looqbox-pokemon-api .     
docker run -p 8080:8080 looqbox-pokemon-api

Class diagram

classDiagram

Stack

  • Java/Kotlin
  • Spring Boot for the framework
  • Gradle for dependency management and local deployment

Guidelines

You need to make a HTTP REST API that

  • Consumes the PokeAPI data.

  • Provides an endpoint to query pokemons based on the substring of its name. For example:

    • Request: GET /pokemons?q=pidge
    • Expected response: {"result" : ["pidgey", "pidgeotto", "pidgeot"]}
  • You need to apply sorting by two algorithms (it is not permitted to use a sorting library, for this particular feature you must implement by yourself). And it’s very important to explain your implemented logic (For instance, you can use inline comments on the source code):

    • the pokemon name's length and;
    • the pokemon name's alphabetical order
  • Find a way to indicate the pokemon name highlight regarding the piece of its queried name. For example:

    • The queried name was pi
    • The highlight object must be {"name": "pikachu", "highlight": "<pre>pi</pre>kachu"} or {"name": "pikachu", "start": 0, "end": 2}

looqbox-backend-challenge's People

Contributors

ramonbecker avatar douglas-ds avatar dmurta1 avatar jonathanxd avatar

Watchers

James Cloos 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.