https://medium.com/coderbyte/the-5-hardest-code-challenges-for-beginners-e410da4474b Challenge DescriptionTake an input string parameter and determine if exactly 3 question marks exist between every pair of numbers that add up to 10. If so, return true, otherwise return false. Some examples test cases are below:
Before reading further, try and think of how you would solve this challenge (you can even write down some steps in pseudocode, or better yet you can write a solution on Coderbyte). AnalysisThis challenge requires several layers of logic to get right, which is why it can be difficult to come up with a solution at first. It requires looping through the string and maintaining the position of every pair of numbers that add up to 10. If you do find two numbers that add up to 10, then you will need to determine if exactly 3 specific characters exist somewhere between these two indices.
Other Challenges... https://edabit.com/challenges/python3 |
Home >
