  In this paper, we propose a two-phase algorithm for solving continuous
rank-one quadratic knapsack problems (R1QKP). In particular, we study the
solution structure of the problem without the knapsack constraint. We propose
an $O(n\log n)$ algorithm in this case. We then use the solution structure to
propose an $O(n^2\log n)$ algorithm that finds an interval containing the
optimal value of the Lagrangian dual of R1QKP. In the second phase, we solve
the restricted Lagrangian dual problem using a traditional single-variable
optimization method. We perform a computational test on random instances and
compare our algorithm with the general solver CPLEX.
