Coder Social home page Coder Social logo

be-challenge-working's Introduction

Your Task

Imagine you are given a set of log sources. Each source is comprised of N log entries. Each entry is a simple javascript object with a timestamp and message. You don't know how many log entries each source has, BUT you do know that the entries within each source are sorted chronologically (that last bit is important).

Your mission is to print out all of the entries, across all of the sources, in chronological order. You don't need to store the final collection of all the entries, literally just print them to console. Some things to keep in mind:

  • You don't know how long each log source is. What if it had millions of entries and was terabytes in size? (In other words, reading the entirety of a log source into memory probably won’t work well.)
  • Some log sources could contain logs from last year, some from yesterday, you won't know the timeframe of a log source until you start looking.
  • Consider what would happen when you're asked to merge 1K log sources, or even 1M log sources. Where might your bottlenecks arise?

There are two parts of the challenge which you'll see when you dive into things. You can get started with things by running npm start.

We expect candidates to spend 1-3 hours on this exercise. By the way, you may use any third party modules you like, and by all means feel free to ask questions!

Submission

Simply create a GitHub repo and email us the link!

Farrah's Notes:

// Use min-heap so we can select min element in constant time // npm install min-heap

be-challenge-working's People

Contributors

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