I have binary codes as 10111 , 100011, 11101111 etc. now what data structure should I use to store these codes so that minimum size is required to store them?
I can’t use string array as size required will be more as compared than storing the decimal equivalent of above binary codes.
java.util.BitSetis designed for that if the length is not fixed.