From e678c347452eaab29ee620d6699bd09f979d5a3e Mon Sep 17 00:00:00 2001 From: irifkin Date: Wed, 29 Nov 2023 14:39:37 -0500 Subject: README formatting --- challenge-245/ianrifkin/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/challenge-245/ianrifkin/README.md b/challenge-245/ianrifkin/README.md index 6d044c531d..d9c9e325ba 100644 --- a/challenge-245/ianrifkin/README.md +++ b/challenge-245/ianrifkin/README.md @@ -22,9 +22,10 @@ Output: ('c++', 'java', 'haskell') My first instinct to solve this was to align the two arrays (lang and popularity) into a hash. While this made sense I quickly realized I would still have the step of sorting based on the keys. This should still have worked but since the arrays have the same indices I didn't really need to combine them into a hash. I sorted the popularity array and outputted the indices in sort order (not the values): -`my @pop_sort_idx = sort { $popularity[$a] <=> $popularity[$b] } 0 .. $#popularity;` +```my @pop_sort_idx = sort { $popularity[$a] <=> $popularity[$b] } 0 .. $#popularity;``` -With that I return an array of the languages in sort order using the inputted langage array in the order of the sorted popularity: `@lang[@pop_sort_idx];` +With that I return an array of the languages in sort order using the inputted langage array in the order of the sorted popularity: +```@lang[@pop_sort_idx];``` ## Task 2: Largest of Three -- cgit