Creating Array with Distinct Differences
Given two positive integers, n and d (less than n), the task is to create an array result[] of n distinct positive integers that range from 1 to n, such that result = {a1, a2, a3, ..., an}, then the result = {|a1 - a2|, |a2 - a3|, |a3 - a4|, ..., |an-1 - an|} has exactly d distinct integers. If mult