The Princess of Wales completed the grueling 24-hour task in support of a cancer charity.