Skip to content

Instantly share code, notes, and snippets.

View Mr-Xcoder's full-sized avatar
🎯
Focusing

Victor Dumbrava Mr-Xcoder

🎯
Focusing
View GitHub Profile
@m-ender
m-ender / simple-challenges.md
Last active January 10, 2025 17:12
Simple challenges on CodeGolf.SE to take new programming languages for a spin.
@Mr-Xcoder
Mr-Xcoder / BestOf2017.md
Last active April 23, 2018 13:39
Winners of "Best of PPCG 2017"
@Mr-Xcoder
Mr-Xcoder / 05AB1E-Challenges.md
Last active March 2, 2018 10:07
05AB1E Mini Challenges

List of 05AB1E challenges

This Gist will contain challenges of varying difficulty, involving features that are somewhat specific to 05AB1E, for people to try out. The contents of this will then be added to The 05AB1E Lounge, where they will have their own tab.

  • Given a list of integers, return the longest prefix with the maximal mode. In case two or more elements of a prefix occur the maximal number of times, select the highest one. Current record: 7 bytes. Test cases:
    [-5, -3, -5, 3, 6, -5]            -> [-5, -3]
    [5, 3, 9, 4, 4, 9, 5, 6, 6, 4]    -> [5, 3, 9, 4, 4, 9, 5, 6, 6]
    [5, 9, 3, 7, 3, 9, 4, 3, 0, 8, 4] -> [5, 9, 3, 7, 3, 9, 4]