Viridien interview question

solving a cubic equation