Menu

Post image 1
Post image 2
1 / 2
0

The Weekly Challenge: The Common Beauty

DEV Community: perl·Simon Green·3 days ago
#B1tEKnjK
#dev#fullscreen#number#enter#exit#article
Reading 0:00
15s threshold

Weekly Challenge 375 Each week Mohammad S. Anwar sends out The Weekly Challenge , a chance for all of us to come up with solutions to two weekly tasks. My solutions are written in Python first, and then converted to Perl. Unless otherwise stated, Copilot (and other AI tools) have NOT been used to generate the solution. It's a great way for us all to practice some coding. Challenge , My solutions Task 1: Single Common Word Task You are given two array of strings. Write a script to return the number of strings that appear exactly once in each of the two given arrays. String comparison is case sensitive. My solution For input from the command, I take two space separated strings to generate the two arrays. For this task, I start by counting the frequency of words in each list (array in Perl).…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More