Created
November 17, 2025 21:24
-
-
Save greystate/0863d3b3733026590912b39369befa58 to your computer and use it in GitHub Desktop.
Solution for 'Interview question of the week' (week 47)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function repeatedIntegers(i) { | |
| let repeats = [] | |
| while (i > 0) { | |
| repeats.push(Array.from({ length: i }, (v, n) => i)) | |
| i -= 1 | |
| } | |
| return repeats.flat() | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment