Thank you everyone for your submissions! With particular thanks to @alexcraig and @factoradic, here are our favorites.
Winner: @gigawhiz30076, first person to respond with a fully correct solution for the hard level challenge, and has included an excellent description. Makes great use of anonymous functions and is the most efficient as it uses just one
See Oscar’s solution here
2nd Place: @brotherpeteniemeyerg, nice to see a Java submission, and nice that extra thought has been put in changing the case of letters. All done in-place, but slightly less efficient due to the number of while loops, and the fact that some are nested.
See Peter’s solution here
3rd Place: @javiervfa, nice use of defining a regular expression in a variable, case in third rather than second place due to the number of while loops. Very good to see that substrings have been used, as opposed to splitting the string into an array of words (so arguably this solution is the most “in-place”).
See Javier’s entry here.
###Feedback and honorable mentions:
@bradleybirchig - your solution is not done in-place, as it uses two separate arrays. However nice, efficient implementation and runs in constant time.
@datasolver52528 - Nicely implemented, uses many separate functions, which is clearer. However, it means that it does not complete the challenge in-place, and the code takes longer to run than shorter solutions. Putting capitals in the right place is a great addition though!
@lealik17 - Nice neat solution, quite a good way of doing it, since 3 arrays are used does not meet the in-place criteria, but still very good effort.
@oneilltp18gmail.com - nice solution using a dictionary, and good use of itertools and the lambda function. This also isn’t in place.
@stopthedeath - good use of a Hash, nice Ruby solution.
@foobarfoo - lovely solution making full use of java script’s inbuilt functions and mappings, however not done in place as two separate structures are used. Very efficient solution.
@tagrockstar79958 - very nice solution, again one that uses multiple arrays and a dictionary. All pulled together very nicely.
@devsurfer70303 - algorithm works nicely and efficiently, again uses multiple structures
@rd0122 - another nice solution in python using multiple structures
@cloudsolver69633 - a similar solution to digitalmaster and foobarfoo, works nicely.
@ajaxblaster47797 - nice simple python solution