Before jumping into Pr first comment for assign. All Problem from Edabit. Link is mandatory to add
Problem statement: Given an array of strings and an original string, write a function to output an array of boolean values - True if the word can be formed from the original word by swapping two letters only once and False otherwise.
Examples:
validate_swaps(["BACDE", "EBCDA", "BCDEA", "ACBED"], "ABCDE")
➞ [True, True, False, False]
# Swap "A" and "B" from "ABCDE" to get "BACDE".
# Swap "A" and "E" from "ABCDE" to get "EBCDA".
# Both "BCDEA" and "ACBED" cannot be formed from "ABCDE" using only a single swap.
validate_swaps(["32145", "12354", "15342", "12543"], "12345")
➞ [True, True, True, True]
validate_swaps(["9786", "9788", "97865", "7689"], "9768")
➞ [True, False, False, False]
Before jumping into Pr first comment for assign. All Problem from Edabit. Link is mandatory to add
Problem statement: Given an array of strings and an original string, write a function to output an array of boolean values -
True
if the word can be formed from the original word by swapping two letters only once andFalse
otherwise. Examples:Problem Link: https://edabit.com/challenge/di7ZjxgvLgz72PvCS
Before submitting a PR please Check some details. Check Edabit for problem task
This repository is valid for HacktoberFest2020
Read before making PR - How to contribute on Github Good Luck,