Code Monkey home page Code Monkey logo

atmos-take-home's Introduction

Atmos Take Home Test

This is my submission for Atmos Take home test. Thank you Matt and Atmos team for your consideration. It's been fun thinking about the challenge. The original problem statemnt can be found below. I answered the questions at the top of the compatible.py file in a string literal. Hopefully you enjoy reading through my thoughts and they are coherent enough to understand without a whiteboard. It is an incomplete solution in terms of edge cases and being optimal but I wanted to adhere to the rough timeline guide.

Finger Crossed!

Project Instructions

Atmos has to find out where we will place a home on a lot in our 3D models. The first part of this process is checking whether the home fits on the lot at all. In this challenge, we want to know whether a given home and a given lot are "compatible", ie. whether the home can fit within the lot.

Imagine a 2D grid with a width and length of 100 units. Homes have a rectangular "building footprint" of the form: "[width, length]". Lots have "boundaries", an array of coordinates that form a rectilinear polygon (straight lines and right angles only) of the form: "[(x, y), (x, y), ...]".

Create a function isCompatible() that receives a home's footprint and a lot's boundaries, and returns whether the home is compatible with the lot.

The prompt may be ambiguous on some parts - that's intentional! We want you to make reasonable assumptions when faced with ambiguity. We won't judge you on the details; we're more interested in seeing your general approach. Also, feel free to search up anything you'd like; as a hint, there are general mathematical solutions to this problem and its variants.

Bonus

In real life, lots have "setbacks", which are buffer zones within a lot's boundaries that determine how much space must exist between the lot boundaries and the home. Think of them as "padding" in CSS.

Assuming setbacks are the same for every side of a lot, specified as an integer in units, incorporate setbacks into the isCompatible() function.

How to Submit

Upload your code Upload your completed project (feel free to make a Gist) to your GitHub, and then paste a link to the repository or Gist below in the form along with any comments you have about your solution.

Questions

Please answer the following questions in your submission: What improvements would you make if you were to start over again? In real life, lots are unfortunately not rectilinear - they can be of any general shape. With this in mind, how would you change your approach to determine where a home could fit on a lot?

atmos-take-home's People

Contributors

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