Robbie Hatley's Solutions To The Weekly Challenge #218
For those not familiar with "The Weekly Challenge", it is a weekly programming puzzle, usually with two parts, cycling every Sunday. You can find it here: The Weekly Challenge This week (2023-05-21 through 2023-05-27) is weekly challenge #218. Task 1 is as follows: "Given a list of 3 or more integers, write a script to find the 3 integers whose product is maximum and return their product." This is just a matter of trying all combinations and seeing which is max. I use the "Math::Combinatorics" CPAN module again (it's becoming one of my favorite go-to modules): Robbie Hatley's Solution to The Weekly Challenge 218-1 Task 2 is as follows: "You are given a m x n binary matrix i.e. having only 1 and 0. You are allowed to make as many moves as you want to get the highest score. A move can be either toggling each value in a row or column. To get the score, convert the each row binary to dec and return the sum." Yikes. There is ...