4 ms·There are many ways to do this. It's not a difficult problem unless memory is constrained.by paulpauper 3y agoThere are many ways to do this. It's not a difficult problem unless memory is constrained.