Online Course Discussion Forum
USACO: Is there a java type that has a big capacity and can do the bitwise shift operator?
This forum has a limit to the number of forum postings you can make in a given time period - this is currently set at 1 posting(s) in 1 week
Be careful when the length of the reversal is odd; the result may be different from what you think.
If the bitwise operation for long strings of 0s and 1s is critical to your algorithm, you could write a helper class to represent that data type. In the helper class, represent the big capacity string with an array of long, and write methods for add digit, shift, complement, bitwise AND, bitwise OR, etc.
Social networks