We use an inverse scattering approach to study multi-peakon solutions of the Degasperis-Procesi (DP) equation, an integrable PDE similar to the Camassa-Holm shallow water equation. The spectral problem associated to the DP equation is equivalent under a change of variables to what we call the cubic string problem, which is a third order non-selfadjoint generalization of the well-known equation describing the vibrational modes of an inhomogeneous string attached at its ends. We give two proofs that the eigenvalues of the cubic string are positive and simple; one using scattering properties of DP peakons, and another using the Gantmacher-Krein theory of oscillatory kernels. For the discrete cubic string (analogous to a string consisting of n point masses) we solve explicitly the inverse spectral problem of reconstructing the mass distribution from suitable spectral data, and this leads to explicit formulas for the general n-peakon solution of the DP equation. Central to our study of the inverse problem is a peculiar type of simultaneous rational approximation of the two Weyl functions of the cubic string, similar to classical Pade-Hermite approximation but with lower order of approximation and an additional symmetry condition instead. The results obtained are intriguing and nontrivial generalizations of classical facts from the theory of Stieltjes continued fractions and orthogonal polynomials. ; Comment: 58 pages, LaTeX with AMS packages, to appear in International Mathematics Research Papers