in the video,it is described that space required for petersons solution is 3 bits.How is that possible because 2 booleans take 2 bits whereas integer may take 4 bytes which is 32 bits right.Please give insight on this.
Space required for peterson solution
hello @kani001
it will not be 3 bits.
let say one integer takes 4 bytes and 2 boolean variable ( each variable can be of 1byte or 1bit if we use bitset)
so space required will be somewhere around
4 bytes + 2 * 1 bytes or 4bytes + 2 * 1 bit