Skip to content

Files

Latest commit

Jun 21, 2019
64968f1 · Jun 21, 2019

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jun 21, 2019
Jun 21, 2019

Given an even number (greater than 2), return two prime numbers whose sum will be equal to the given number.

A solution will always exist. See Goldbach’s conjecture [https://en.wikipedia.org/wiki/Goldbach%27s_conjecture].

Example:

Input: 4 Output: 2 + 2 = 4

If there are more than one solution possible, return the lexicographically smaller solution.

If [a, b] is one solution with a <= b, and [c, d] is another solution with c <= d, then

[a, b] < [c, d]

If a < c OR a==c AND b < d.