diff options
| author | irifkin <ianrifkin@ianrifkin.com> | 2023-11-29 14:39:37 -0500 |
|---|---|---|
| committer | irifkin <ianrifkin@ianrifkin.com> | 2023-11-29 14:39:37 -0500 |
| commit | e678c347452eaab29ee620d6699bd09f979d5a3e (patch) | |
| tree | 121646fc4e3d46354c1cba486577feb1789954dd | |
| parent | 4c7c82fd82af45e00923f93b2cc41558f0c7c10e (diff) | |
| download | perlweeklychallenge-club-e678c347452eaab29ee620d6699bd09f979d5a3e.tar.gz perlweeklychallenge-club-e678c347452eaab29ee620d6699bd09f979d5a3e.tar.bz2 perlweeklychallenge-club-e678c347452eaab29ee620d6699bd09f979d5a3e.zip | |
README formatting
| -rw-r--r-- | challenge-245/ianrifkin/README.md | 5 |
1 files 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 |
