-
-
Save brijeshb42/6039309 to your computer and use it in GitHub Desktop.
FB Coding Round Question 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A sstring is a string which comprises of only lowercase letters and in which no two consecutive letters are the same. | |
You are given a string (length <= 100). Print the number of sstrings lower than the given string and of the same length. | |
Input: Only 1 line which is the given string (all lowercase letters). | |
Output: Number of sstrings lower than the given string of the same length. | |
Sample Input: | |
bcd | |
Sample Output: | |
653 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment