Hacktoberfest-accepted-2022
Hacktoberfest-accepted-2022 copied to clipboard
bitarray in c++ added
question:-You are given four integers:N ,S,P ,Q . You will use them in order to create the sequence a with the following pseudo-code.
a[0] = S (modulo 2^31) for i = 1 to N-1 a[i] = a[i-1]*P+Q (modulo 2^31) --task is to calculate the number of distinct integers in the sequence a . question asked in various companies interview--solution given in repo.