No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Codility Lessons

I share my Java solutions to Codility's Lessons here. The lessons are on here
These solutions have the emphasis on readability.

So instead of writing

    if ((N >> i & mask) == 1) {

I would use

    // shift the current bit to the right most bit
    int currentN = N >> i;
    // and extract the right most bit
    int rightMostBit = currentN & mask;
    if (rightMostBit == 1) {

The Java compiler is able to easily optimize such readability formatting.