NatWest Group Interview Question

Find the duplicate characters in a string and explain different ways to solve it.