Postgres Find Duplicate Values In Array Jquery Interview Question