//hash tables are used to iterate over an array using a key to compute the array index, instead of using the key as an array index
//for this function i is used as a key to loop through the array
const showDuplicateNo = (array) => { let hashTable = []; let duplicateNo = [];
for (let i = 0; i < array.length; i++) {