An algorithm that turns an integer into binary and returns the biggest amount of zeros in the ranges which are between the character “1” of it.

import java.util.*; class Algorithm { public int[] algorithm(int Num) { return Integer .toBinaryString(Num) // turn to binary .replaceAll(“(^0+|0+$)”, “”) … More

Java : Switch

Use switch Statement when you know the possible values and you want do something for each any case. Example : … More