There is a memory with address locations in the range 0 to N. Write a program in C++ to generate a list of N random numbers within the range 0 to N to access the memory. Things to follow: 1) The numbers in the list cannot repeat 2) Cannot use the in-built rand functions 3)Should have the least complexity.
There are three arrays of size 0 to N. Write a program in C++ to find the common elements beetween the arrays and also try to find the number of times they are repeated. Things to follow: 1) Should have the lease complexity 2) The elements in the array are of infinite range, so we can't do array[i]++.