Submitted by: Mohammad Sajid Anwar
You are given an array of words and a word.
Write a script to return true if concatenating the first letter of each word in the given array matches the given word, return false otherwise.
Input: @array = ("Perl", "Weekly", "Challenge")
$word = "PWC"
Output: true
Input: @array = ("Bob", "Charlie", "Joe")
$word = "BCJ"
Output: true
Input: @array = ("Morning", "Good")
$word = "MM"
Output: false
Submitted by: Mohammad Sajid Anwar
You are given two strings.
Write a script to return true if swapping any two letters in one string match the other string, return false otherwise.
Input: $str1 = "desc", $str2 = "dsec"
Output: true
Input: $str1 = "fuck", $str2 = "fcuk"
Output: true
Input: $str1 = "poo", $str2 = "eop"
Output: false
Input: $str1 = "stripe", $str2 = "sprite"
Output: true
Last date to submit the solution 23:59 (UK Time) Sunday 20th April 2025.