Let $G$ be a group of order $p^n$, where $p$ is prime, and let $n_k$ be the number of elements of order $p^k$ in $G$. By analogy with the degree sequence of a graph, let's use the not-really-accurate term "degree sequence of $G$" for this sequence.
(Side question: is there a standard name for this? Not knowing one, I could not do very much advance investigation on my own.)
Is there an algorithm which, given a finite sequence $n_i$, efficiently decides whether this is the degree sequence of any group?
For example, given the sequence $\langle 1, 5,2\rangle$ or $\langle1,1,2,4\rangle$, the answer is yes ($D_8$ and $Z_8$ respectively), but for $\langle 1,4,3 \rangle$ the answer is no.
(The analogous problem for graph degree sequences is called the Erdős–Gallai theorem, and is efficiently decided by the Havel-Hakimi algorithm.)
One can of course ask a more general version of the same question for a non-$p$-group, with the input $n_i$ being the number of elements of order $i$ rather than the number of order $p^i$.