Given a lowercase string that has alphabetic characters only and no spaces, implement a function that will return the highest value of consonant su...
For further actions, you may consider blocking this person and/or reporting abuse
Scala
I've always appreciated Scala solutions for their mixed-notation to function-call chaining, it's truly bizarre. 😲
Here is a Python one-liner
Javascript solution
Nice! Here's my implementation:
Very nice, I wasn't aware of the
c.charCodeAt(0) - 96
rule, didn't work with chars very much in all these years to be honest.It only works with lowercase a to z, because UTF-16 represents them as contiguous code points, starting at 97.
Elixir
Go, single-pass
Java Streams
C++ solution using simple for-loop
Rust:
C