2025-05-12 14:34:42 +02:00
|
|
|
# Find Unique Sums
|
|
|
|
|
|
|
|
Implementation of a job interview assignment.
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
```python
|
|
|
|
from sums import pairs
|
|
|
|
|
|
|
|
pairs([4, 23, 65, 67, 24, 12, 86])
|
|
|
|
```
|
|
|
|
|
|
|
|
## Implementation Notes
|
|
|
|
|
|
|
|
Algorithmic complexity will be $O(n^2\log n)$ - the second $n$ comes from the complexity of dictionary/set insertions.
|
|
|
|
|
|
|
|
`NumberPair` makes the implementation of test cases noisy - given more time I'd probably either remove it, or replace the `__eq__` implementation.
|
|
|
|
|
|
|
|
There is no "script" version - the assignment asks for a library call, and I'd have to invent a text format for this.
|