In a slightly different notation, your question reads as follows:
Given positive integers $m$ and $n$, and a function $r\colon[-n,n]\to{\mathbb Z}_{\ge 0}$ with $r(0)=m$, $r(n)=1$, $r(-n)+\dotsb+r(n)=m^2$, and $r(-d)=r(d)$ for each $d\in[1,n]$, does there exist an $m$-element set $A\subseteq[0,n]$ such that every integer $d\in[-n,n]$ has exactly $r(d)$ representations as a difference of two elements of $A$?
There are numerous necessary conditions one can give; for instance, letting $D:=\mathrm{supp}\,r$,
- $m\le n+1$ and $r(d)\le m-1$ for each $d\in[1,n]$;
- $|D|\ge m+\min\{2m-3,n\}$ (Freiman's $(3n-3)$-theorem for the difference set);
- $m(2m-1)\le\sum_{d=-n}^n r^2(d)\le\frac13(2m^2+1)m$ (the additive energy of $A$ is somewhere between those of a Sidon set and of an arithmetic progression of size $m$).
For a slightly more elaborate condition, observe that
$$ \Bigg| \sum_{a\in A} e^{2\pi iat} \Bigg|^2 = \sum_{d=-n}^n r(d) e^{2\pi idt} = m + 2\sum_{d=1}^n r(d) \cos(2\pi dt) $$
for any real $t\in[0,1]$; as a result,
$$ \sum_{d=1}^n r(d)\cos(2\pi dt)\ge -m/2,\quad t\in[0,1]. $$
This seems a rather strong condition to me, but it certainly is not sufficient: for any function $f\colon[0,n]\to\mathbb Z_{\ge 0}$, the "skew convolution" $r(d):=\sum_{x}f(x)f(x+d)$ satisfies this condition.
For the algorithmic aspect, you can just check all $m$-element subsets $A\subseteq D$ with $\min A=0$ and $\max A=n$. To make it efficient, use branch-and-cut, starting from $A_0=\{0,n\}$ and at each step trying to expand the set already constructed by adding to it the elements $2,3,\dotsc,n-1$. While adding elements, keep track of the number of representations of each $d\in[1,n]$: if this number ever exceeds $r(d)$, cut this branch and proceed, trying to add the next element.