Explanation
Create an array size of n as a flag that indicate whether a value has been selected or not. The sequence is not jolly everytime you meet this condition.
- There's a zero difference between adjacent number.
- Have difference more than or equal n.
- The same difference exist already.
Source Code
Tidak ada komentar:
Posting Komentar