Challenge Active

The Weekly Challenge

You don't have   to be an   expert

The Weekly Challenge
Task #1 Rearrange Spaces

You are given a string text of words that are placed among number of spaces. Write a script to rearrange the spaces so that there is an equal number of spaces between every pair of adjacent words and that number is maximised. If you can't distribute, place the extra spaces at the end. Finally return the string.

Task #2 Largest Substring

You are given a string. Write a script to return the length of the largest substring between two equal characters excluding the two characters. Return -1 if there is no such substring.

Design Patterns in Modern Perl
📖 New Book by Mohammad Sajid Anwar

Design Patterns in Modern Perl

Classic object-oriented patterns in today's Perl - using core Perl, Moo and Object::Pad. Cleaner, more maintainable code.

View Book →

SO WHAT DO YOU THINK ?

If you have any suggestions or ideas then please do share with us.

Contact with me