We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b6add13 commit 3b3aacdCopy full SHA for 3b3aacd
src/main/java/algorithms/sorting/radixSort/RadixSort.java
@@ -17,6 +17,7 @@ public class RadixSort {
17
* @return The value of the digit in the number at the given segment.
18
*/
19
private static int getSegmentMasked(int num, int segment) {
20
+ // Bit masking here to extract each segment from the integer.
21
int mask = ((1 << NUM_BITS) - 1) << (segment * NUM_BITS);
22
return (num & mask) >> (segment * NUM_BITS);
23
}
0 commit comments