Nagata's conjecture on algebraic curves