We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae1026e commit 799b72cCopy full SHA for 799b72c
week4/priority-queues/task3/TASK.md
@@ -0,0 +1,8 @@
1
+### Taxicab numbers
2
+
3
+A `taxicab` number is an integer that can be expressed as the sum of two cubes of positive integers in two different ways: `a^3 + b^3 = c^3 + d^3`.
4
+For example, `1729` is the smallest taxicab number: `9^3 + 10^3 = 1^3 + 12^3`.
5
+Design an algorithm to find all taxicab numbers with `a`, `b`, `c`, and `d` less than `n`.
6
7
+- Version 1: Use time proportional to `(n^2)*log(n)` and space proportional to `n^2`.
8
+- Version 2: Use time proportional to `(n^2)*log(n)` and space proportional to `n`.
week4/priority-queues/task3/solution.rb
0 commit comments