Robbie Hatley's Solutions To The Weekly Challenge #265
For those not familiar with "The Weekly Challenge", it is a weekly programming puzzle with two parts, cycling every Sunday. You can find it here: The Weekly Challenge This week (2024-04-14 through 2024-04-20) is weekly challenge #265. Its tasks are as follows: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Task 265-1: 33% Appearance Submitted by: Mohammad Sajid Anwar You are given an array of integers, @ints. Write a script to find an integer in the given array that appeared 33% or more. If more than one found, return the smallest. If none found, then return undef. Example 1: Input: @ints = (1,2,3,3,3,3,4,2) Output: 3 1 appeared 1 times. 2 appeared 2 times. 3 appeared 4 times. 3 appeared 50% (>33%) in the given array. Example 2: Input: @ints = (1,1) Output: 1 1 appeared 2 times. 1 appeared 100% (>33%) in the given array. Example 3: Input: @ints = (1,2,3) Output: 1 1 appeared 1 times. 2 appeared 1 times. 3 appeared 1 times. Since all three app