Skip to main content

<Enter a one-sentence description of this project here.>

Project description

Sparkdata challenge for finding multiplicative pairs in a sorted array of decimal numbers that are constructed from two arrays (A,B), one containing the integer part and one containing the decimal part but as an integer.

The decimal numbers are then constructed as following: C[i] = A[i] + B[i] / scale

where the scale is a fixed number (here 1_000_000).

Features

  • Brute force method that fails due to memory allocation for large arrays but only uses numpy vectorized functions

  • Brute force method based on a double for-loop

  • Math based method - optimized using mathematical properties of the inequalities and leveraging that the decimal number array C is sorted.

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

sparkdatachallenge-0.1.1.tar.gz (5.2 kB view hashes)

Uploaded Source

Built Distribution

sparkdatachallenge-0.1.1-py3-none-any.whl (5.6 kB view hashes)

Uploaded Python 3

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