Skip to main content

Check if 2 lines overlap

Project description

Ormuco Code Challenge

This project has been created only for demonstration purpose.

The challenge

Your goal for this question is to write a program that accepts two lines (x1,x2) and (x3,x4) on the x-axis and returns whether they overlap. As an example, (1,5) and (2,6) overlaps but not (1,5) and (6,8).

The Answer

source directory: ./overlap

usage:

  • Run pip3 install cf_lines_overlap
from overlap.overlap import overlap

result = overlap((1,5), (4,25))

# It will return True if the lines overlap, False otherwise

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cf_lines_overlap-0.0.2.tar.gz (1.6 kB view details)

Uploaded Source

File details

Details for the file cf_lines_overlap-0.0.2.tar.gz.

File metadata

  • Download URL: cf_lines_overlap-0.0.2.tar.gz
  • Upload date:
  • Size: 1.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for cf_lines_overlap-0.0.2.tar.gz
Algorithm Hash digest
SHA256 d65d2bd58c042b44205edde0d0135cacfccf32cfba8532e6f57cff5f56741ced
MD5 cd3cf0a8f6d1b672398780e5096a641d
BLAKE2b-256 e29caa663fac3f721e588b736d7e2eeb1099a57cfbd6fdd9b715559f3768f082

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page