Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove factors from palindrome-products #2003

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions exercises/practice/palindrome-products/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ For example, `121` is a palindromic number but `112` is not.
Given a range of numbers, find the largest and smallest palindromes which
are products of two numbers within that range.

Your solution should return the largest and smallest palindromes, along with the factors of each within the range.
If the largest or smallest palindrome has more than one pair of factors within the range, then return all the pairs.
Your solution should return the largest and smallest palindromes, if there are any.

## Example 1

Expand All @@ -21,16 +20,12 @@ And given the list of all possible products within this range:
The palindrome products are all single digit numbers (in this case):
`[1, 2, 3, 4, 5, 6, 7, 8, 9]`

The smallest palindrome product is `1`.
Its factors are `(1, 1)`.
The largest palindrome product is `9`.
Its factors are `(1, 9)` and `(3, 3)`.
The smallest palindrome product is `1` (`1 * 1`).
The largest palindrome product is `9` (`1 * 9` and `3 * 3`).

## Example 2

Given the range `[10, 99]` (both inclusive)...

The smallest palindrome product is `121`.
Its factors are `(11, 11)`.
The largest palindrome product is `9009`.
Its factors are `(91, 99)`.
The smallest palindrome product is `121` (`11 * 11`).
The largest palindrome product is `9009` (`91 * 99`).