Answer:
#include <iostream>
using namespace std;
void findDuplicate(int arr[], int size) {
for(int i = 0; i < size; ++i) {
for(int j = i+1; j < size; ++j) {
if(arr[j] == arr[i]) {
cout << arr[j] << endl;
return;
}
}
}
cout << -1 << endl;
}
int main() {
int arr[] = {2, 3, 5, 6, 11, 20, 4, 8, 4, 9};
findDuplicate(arr, 20);
return 0;
}
Explanation:
External computer components connect to the motherboard through a series of ports on the computer case. Many components have their own dedicated port connections, such as those to connect audio equipment or the computer monitor. Others may share a single type of connector, such as the USB, that connects everything from keyboards and mice to game pads and external hard drives. there
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
'use strict';
/**
* Alias for document.getElementById.
* @param {string} id The ID of the element to find.
* @return {HTMLElement} The found element or null if not found.
*/
function $(id) {
// eslint-disable-next-line no-restricted-properties
return document.getElementById(id);
}
/**
* Get the preferred language for UI localization. Represents Chrome's UI