Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bell-kevin/consonant-value
Given a lowercase string that has alphabetic characters only and no spaces, return the highest value of consonant substrings. Consonants are any letters of the alphabet except "aeiou". We shall assign the following values: a = 1, b = 2, c = 3, .... z = 26. For example, for the word "zodiacs", let's cross out the vowels. We get: "z o d ia cs" -- The consonant substrings are: "z", "d" and "cs" and the values are z = 26, d = 4 and cs = 3 + 19 = 22. The highest is 26. solve("zodiacs") = 26 For the word "strength", solve("strength") = 57 -- The consonant substrings are: "str" and "ngth" with values "str" = 19 + 20 + 18 = 57 and "ngth" = 14 + 7 + 20 + 8 = 49. The highest is 57. For C: do not mutate input.
https://github.com/bell-kevin/consonant-value
code-wars-solution
Last synced: about 1 month ago
JSON representation
Given a lowercase string that has alphabetic characters only and no spaces, return the highest value of consonant substrings. Consonants are any letters of the alphabet except "aeiou". We shall assign the following values: a = 1, b = 2, c = 3, .... z = 26. For example, for the word "zodiacs", let's cross out the vowels. We get: "z o d ia cs" -- The consonant substrings are: "z", "d" and "cs" and the values are z = 26, d = 4 and cs = 3 + 19 = 22. The highest is 26. solve("zodiacs") = 26 For the word "strength", solve("strength") = 57 -- The consonant substrings are: "str" and "ngth" with values "str" = 19 + 20 + 18 = 57 and "ngth" = 14 + 7 + 20 + 8 = 49. The highest is 57. For C: do not mutate input.
- Host: GitHub
- URL: https://github.com/bell-kevin/consonant-value
- Owner: bell-kevin
- License: gpl-3.0
- Created: 2022-06-28T02:00:33.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-06T22:50:54.000Z (over 2 years ago)
- Last Synced: 2024-05-02T04:15:59.151Z (8 months ago)
- Topics: code-wars-solution
- Language: JavaScript
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Consonant-value
Given a lowercase string that has alphabetic characters only and no spaces, return the highest value of consonant substrings. Consonants are any letters of the alphabet except "aeiou". We shall assign the following values: a = 1, b = 2, c = 3, .... z = 26. For example, for the word "zodiacs", let's cross out the vowels. We get: "z o d ia cs" -- The consonant substrings are: "z", "d" and "cs" and the values are z = 26, d = 4 and cs = 3 + 19 = 22. The highest is 26. solve("zodiacs") = 26 For the word "strength", solve("strength") = 57 -- The consonant substrings are: "str" and "ngth" with values "str" = 19 + 20 + 18 = 57 and "ngth" = 14 + 7 + 20 + 8 = 49. The highest is 57. For C: do not mutate input.== We're Using GitHub Under Protest ==
This project is currently hosted on GitHub. This is not ideal; GitHub is a
proprietary, trade-secret system that is not Free and Open Souce Software
(FOSS). We are deeply concerned about using a proprietary system like GitHub
to develop our FOSS project. We have an
[open {bug ticket, mailing list thread, etc.} ](INSERT_LINK) where the
project contributors are actively discussing how we can move away from GitHub
in the long term. We urge you to read about the
[Give up GitHub](https://GiveUpGitHub.org) campaign from
[the Software Freedom Conservancy](https://sfconservancy.org) to understand
some of the reasons why GitHub is not a good place to host FOSS projects.If you are a contributor who personally has already quit using GitHub, please
[check this resource](INSERT_LINK) for how to send us contributions without
using GitHub directly.Any use of this project's code by GitHub Copilot, past or present, is done
without our permission. We do not consent to GitHub's use of this project's
code in Copilot.![Logo of the GiveUpGitHub campaign](https://sfconservancy.org/img/GiveUpGitHub.png)