Question : is dual array
Answered by : lonely-lapwing-gn9fzwerf99j
Dual array Define a Dual array to be an array where every value occurs exactly twice. For example, {1, 2, 1, 3, 3, 2} is a dual array.The following arrays are not Dual arrays {2, 5, 2, 5, 5} (5 occurs three times instead of two times) {3, 1, 1, 2, 2} (3 occurs once instead of two times) Write a javascript function named isDual that returns 1 if its array argument is a Dual array. Otherwise it returns 0.
Source : https://www.chegg.com/homework-help/questions-and-answers/dual-array-define-dual-array-array-every-value-occurs-exactly-twice-example-1-2-1-3-3-2-du-q69009475 | Last Update : Mon, 27 Dec 21