SotaTek JSC interview question

How to check an array have duplicated element