String Reversal & Duplication
Lesson 21 of 24 in Coddy's Golang Challenges - Level 1 course.
Challenge
EasyWe have a string like this: "abcdfgh".
Write a function that takes a string as input, reverses it, and doubles each character to create a new string.
For example, if the input string is "abcdfgh", the expected output should be "hhggffccbbddaa".
The function should reverse the input string and then duplicate each character in the reversed string to form the new string.
Try it yourself
func reverseAndDouble() {
}All lessons in Golang Challenges - Level 1
1Introduction
Introduction4Play with Characters
IntroductionString TokenizerSubstring ExtractorCharacter Occurrence CounterString Character PrinterString Reversal & DuplicationWord CounterString CompressionRemoves Duplicate