Experimenting with isso comments
Experimenting with isso comments, we'll see how it goes.
Experimenting with isso comments, we'll see how it goes.
Weekly Challenge 359 Task 1: Digital Root: You are given a positive integer, $int. Write a function that calculates the additive persistence of a positive integer and also return the digital root. Digital root is the recursive sum of all digits in a number until a single digit is obtained.
Task 2: String Reduction: You are given a word containing only alphabets, Write a function that repeatedly removes adjacent duplicate characters from a string until no adjacent duplicates remain and return the final word. Easy enough with a simple regex substitution using a backreference. In Perl: sub string_reduction($word)
Task 2: Encrypted String: You are given a string $str and an integer $int. Write a script to encrypt the string using the algorithm — for each character $char in $str, replace $char with the $int th character after $char in the alphabet, wrapping if needed and return the encrypted string.
Task 1: Max Str Value: You are given an array of alphanumeric string, @strings. Write a script to find the max value of alphanumeric string in the given array. The numeric representation of the string, if it comprises of digits only otherwise length of the string. I'm going