Weekly Challenge: Good shuffling
dev.to·20h·
Discuss: DEV
Custom Rule Development
Preview
Report Post

Weekly Challenge 350

Each week Mohammad S. Anwar sends out The Weekly Challenge, a chance for all of us to come up with solutions to two weekly tasks. My solutions are written in Python first, and then converted to Perl. It’s a great way for us all to practice some coding.

Challenge, My solutions

Task 1: Good Substrings

Task

You are given a string.

Write a script to return the number of good substrings of length three in the given string. A string is good if there are no repeated characters.

My solution

This is relatively straight forward, so doesn’t require much explan…

Similar Posts

Loading similar posts...