Giter VIP home page Giter VIP logo

tech-test's Introduction

PEBKAC - The N3XTCODER fullstack developer challenge

1. Deduplication algorithm

Using a language of your choice, implement a function to deduplicate a list of words, so that, the function receives the list as an argument and returns the list without the duplicates. Here's an example in Javascript

const wordList = ['not', 'a', 'pheasant', 'plucker', 'but', 'a', 'pheasant', "plucker's", 'son']

console.log(deduplicate(wordList))

[ 'not', 'a', 'pheasant', 'plucker', 'but', 'plucker\'s', 'son' ]

NB: the order of the output list does not matter.

There are many ways to do this - feel free to google your options. We want to see:

  1. The function in syntactically correct (and readable) code.
  2. An explanation of why you would choose this particular method.
  3. A unit test!

2. Booking system data schema

Imagine you are implementing a booking system for a peer2peer car share.

User A, "Lender" needs to specify when their car is available, while user B, "Borrower" needs to be able to reserve the car at their preferred time. A car can only be lent to one person at a time.

What data schema would you need to store in order to support these use cases? Feel free to demonstrate a solution in your favourite datastore. The solution should support a simple query to show what cars are available at a given time (even if some bookings have already been made). You don't have to do it relational schema, but you have to show how the query would look.

Here's an example in psuedocode to get you started:

+----------+
| car      |
+----------+
| id       |
| user_id  | 
| metadata |
+----------+

+----------+
| user     |
+----------+
| id       | 
| metadata |
+----------+

Relations:
car belongs to user  

There are many ways to do this - feel free to google your options. We want to see:

  1. Some kind of schema (e.g. sqldump, JSON)
  2. Example of how the query would look
  3. Why is this solution better than some alternative?

3. FrontOps

You have a frontend app written in ReactJS and you are preparing it for production. The app needs to call an API server with a FQDN configured in the variable API_BASE_URL. There will be a production deployment and a staging deployment for demos/testing. How would you deploy the frontend so that the same build (minified JS, CSS and HTML) can be used in production and staging deployments?

We want to see:

  1. A description of how your implementtion would work, e.g. a docker file or a deployment config
  2. A list of steps you need to take to change the FQDN of the API (API_BASE_URL) for production or staging
  3. How would you handle new versions of the API?

Submitting your solution

Please submit your solution as a PR including some nice commits for challenge 1 and the rest in Markdown.

tech-test's People

Contributors

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