Hong Kong, with its dense population and fluid border with China, had one of the hardest outbreaks to control.