Java has been approved by someone
Java has a proper Random class with API (e.g. nextInt(lower, upper)). No need for JS-y (int)(Math.random() * bound).
Random
nextInt(lower, upper)
(int)(Math.random() * bound)
full smell code
hahahaha
Best practices, best copy
hmmm who gave u the sort idea?
Re-raising the issue below, Caesar cipher and vowel counting are already done:
https://www.codewars.com/kata/caesar-cipher-helper https://www.codewars.com/kata/54ff3102c1bad923760001f3
So this kata is a duplicate.
This kata is not the same, it is a variation of both of them
Should work correctly now!
Should work fine now, thanks for your help!
As mentioned below, reference solution is incorrect, and the expected and actual values are flipped in random tests.
Caesar cipher and vowel counting are already done:
Expected and actual values are flipped in the tests.
Reference solution has an error:
input: PISoVmKhWiVrRQ otXlneKaMua aUYjWNG expected: ZScyfwUrasfBba yDhvxoUkWEk keitaXQ ^ ^
This is due to the specifications combining "ASCII values" with wrapping. The ASCII values of lower and uppercase letters don't wrap, so you need to define how to handle those cases (or just ignore ASCII values and base it off of the alphabet).
Java Translation
Loading collection data...
Java has been approved by someone
Java has a proper
Random
class with API (e.g.nextInt(lower, upper)
). No need for JS-y(int)(Math.random() * bound)
.full smell code
hahahaha
Best practices, best copy
hmmm who gave u the sort idea?
Re-raising the issue below, Caesar cipher and vowel counting are already done:
https://www.codewars.com/kata/caesar-cipher-helper
https://www.codewars.com/kata/54ff3102c1bad923760001f3
So this kata is a duplicate.
This kata is not the same, it is a variation of both of them
Should work correctly now!
Should work fine now, thanks for your help!
As mentioned below, reference solution is incorrect, and the expected and actual values are flipped in random tests.
Caesar cipher and vowel counting are already done:
https://www.codewars.com/kata/caesar-cipher-helper
https://www.codewars.com/kata/54ff3102c1bad923760001f3
Expected and actual values are flipped in the tests.
Reference solution has an error:
This is due to the specifications combining "ASCII values" with wrapping. The ASCII values of lower and uppercase letters don't wrap, so you need to define how to handle those cases (or just ignore ASCII values and base it off of the alphabet).
Java Translation