Challenge Library
Coding Challenges
5,893 curated questions across every arena — browse by topic, then jump into a live 2-minute battle to put them to the test.
Filter by type
Filter by difficulty
Popular topics
5,893 challenges total
- Multiple ChoiceBeginner
hardware_destructive_interference_size purpose
cache-lineC++17false-sharing - Multiple ChoiceBeginner
seqlock reader retry condition
seqlocksynchronizationreader-writer - Multiple ChoiceBeginner
std::format return type
std::formatC++20strings - Multiple ChoiceBeginner
flat_map underlying storage
flat_mapC++23containers - Multiple ChoiceBeginner
std::midpoint overflow safety
midpointC++20numericoverflow - Multiple ChoiceBeginner
std::assume contract semantics
assumeC++23optimization - Multiple ChoiceBeginner
span first subview
spanC++20ranges - Multiple ChoiceBeginner
initializer_list lifetime trap
initializer-listlifetimedangling - Multiple ChoiceBeginner
bitset count expression
bitsetpopcountC++20 - Multiple ChoiceIntermediate
std::atomic double operations
atomicsfloating-point - Multiple ChoiceIntermediate
latch vs barrier reusability
synchronizationbarrierlatchC++20 - Multiple ChoiceIntermediate
counting_semaphore acquire
semaphoreC++20concurrency - Multiple ChoiceIntermediate
expected has_value check
std::expectedC++23error-handling - Multiple ChoiceIntermediate
to_chars result contract
to_charsC++17numeric - Multiple ChoiceIntermediate
ranges sort projection argument
rangesprojectionalgorithms - Multiple ChoiceIntermediate
explicit(bool) conditional explicit
explicitC++20constructors - Multiple ChoiceIntermediate
template template variadic match
templatestemplate-templateC++17 - Multiple ChoiceIntermediate
snapshot ctor noexcept move vector
noexceptmove-semanticsvector - Multiple ChoiceHard
lock-free stack ABA mitigation
lock-freeABACAS - Multiple ChoiceHard
shared_ptr lock-free progress hazard
shared_ptrlock-freehazard-pointers - Multiple ChoiceHard
constexpr dynamic allocation requirement
constexprallocationC++20 - Multiple ChoiceHard
typename dependent qualified name
two-phase-lookuptypenametemplates - Multiple ChoiceHard
if constexpr discarded branch syntax
if-constexprtemplatesC++17 - Multiple ChoiceBeginner
jthread RAII and Auto-join
jthreadraiicpp20 - Multiple ChoiceBeginner
std::latch vs Barrier
latchbarriercpp20 - Multiple ChoiceBeginner
Counting Semaphore acquire/try_acquire
semaphoreconcurrencycpp20 - Multiple ChoiceBeginner
Function-Local Static Initialization Guard
staticmagic-staticsthread-safety - Multiple ChoiceBeginner
std::generator Suspension Semantics
generatorrangescpp23 - Multiple ChoiceBeginner
std::stop_token Cooperative Cancellation
stop_tokencancellationcpp20 - Multiple ChoiceBeginner
Atomic wait/notify Semantics
atomicwaitnotifycpp20 - Multiple ChoiceBeginner
std::barrier Phase Completion
barrierphasessynchronization - Multiple ChoiceIntermediate
Memory Fence Ordering Semantics
fencesmemory-orderatomics - Multiple ChoiceIntermediate
Double-Checked Locking with Atomics
dclpatomicssingleton - Multiple ChoiceIntermediate
std::call_once Guarantees
call_onceonce_flagsingleton - Multiple ChoiceIntermediate
Inline Variable ODR Guarantee
inline-variableodrcpp17 - Multiple ChoiceIntermediate
constinit Definition Meaning
constinitstatic-initcpp20 - Multiple ChoiceIntermediate
std::span static_extent Purpose
spanstatic-extentcpp20 - Multiple ChoiceIntermediate
std::bit_cast Requirements
bit_casttype-punningcpp20 - Multiple ChoiceIntermediate
Union Active Member UB
unionactive-memberub - Multiple ChoiceIntermediate
std::function SBO Behavior
std_functionsboallocations - Multiple ChoiceHard
CRTP Mixin Purpose
crtpmixinstatic-polymorphism - Multiple ChoiceHard
Coroutine Frame Lifetime and Destruction
coroutineslifetimecpp20 - Multiple ChoiceHard
co_await Customization Point Lookup
coroutinesco_awaitcustomization - Multiple ChoiceHard
Executors and Schedulers Distinction
executorsschedulersp2300 - Multiple ChoiceHard
std::atomic_ref Requirements
atomic_refalignmentcpp20 - Multiple ChoiceHard
Lock-Free Stack ABA Hazard
lock-freeabacas - Multiple ChoiceHard
RCU Read-Side Guarantees
rcumemoryconcurrency - Multiple ChoiceBeginner
compare_exchange_weak vs strong spurious failure
atomiccompare_exchangeCAS - Multiple ChoiceBeginner
release-acquire pairing guarantee
atomicmemory_orderpublish-subscribe - Multiple ChoiceIntermediate
Sequentially consistent fences
atomicfencememory_order_seq_cst - Multiple ChoiceBeginner
atomic bool spin vs condition_variable
condition_variableatomicspin - Multiple ChoiceIntermediate
False sharing in per-thread counters
false-sharingcache-lineperformance - Multiple ChoiceBeginner
AoS vs SoA cache-friendly layout
data-layoutSoAcache - Multiple ChoiceIntermediate
Virtual dispatch vs CRTP static polymorphism
CRTPvirtualdispatch - Multiple ChoiceHard
Devirtualization opportunities
devirtualizationoptimizationvirtual - Multiple ChoiceIntermediate
Link-time optimization benefits
LTOoptimizationbuild - Multiple ChoiceBeginner
Profile-guided optimization workflow
PGOoptimizationprofiling - Multiple ChoiceHard
noexcept and vector reallocation
noexceptvectorreallocation - Multiple ChoiceIntermediate
Strong vs basic vs nothrow guarantee
exception-safetyvectorguarantees - Multiple ChoiceBeginner
Copy-and-swap idiom purpose
copy-and-swapexception-safetyoperator=
Practice now, dominate the arena
Every challenge here is drawn from the live Code Royale pool. Review a question, then head to the arena to answer under pressure against a real opponent — 2-minute matches, Elo ranking, and badge tiers on the line.