dikshantrajput / Hacktoberfest-accepted-2022

This repository is for everyone who wants to participate in Hacktoberfest 2022. Anyone can contribute/add quality code or projects for your Swags (T- Shirt), must be relevant that can add some value to this repository
117 stars 464 forks source link

bitarray in c++ added #772

Open VARSHAGURBANI opened 1 year ago

VARSHAGURBANI commented 1 year ago

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.