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
mutable lambda capture
cpplambdamutable - Multiple ChoiceIntermediate
optional value access errors
cppoptionalstl - Multiple ChoiceBeginner
variant valueless_by_exception
cppvariantexception-safetyc++17 - Multiple ChoiceIntermediate
any heap allocation properties
cppanystlc++17 - Multiple ChoiceHard
variant visit return type & exhaustive
cppvariantvisitc++17 - Multiple ChoiceBeginner
string_view dangling from temporary
cppstring_viewdanglingc++17 - Multiple ChoiceHard
string_view as function parameter
cppstring_viewlifetimeapi-design - Multiple ChoiceIntermediate
string_view not null-terminated
cppstring_viewc-apilifetime - Multiple ChoiceBeginner
sizeof with padding
cppalignmentsizeofpadding - Multiple ChoiceIntermediate
Member reordering changes sizeof
cppalignmentpaddingsizeof - Multiple ChoiceIntermediate
alignas effect
cppalignmentalignasfalse-sharing - Multiple ChoiceHard
Empty base optimization
cppsizeofempty-base-optimizationtemplates - Multiple ChoiceIntermediate
Member pointer size
cppsizeofpointer-to-memberabi - Multiple ChoiceBeginner
constexpr vs const
cppconstexprconst-correctness - Multiple ChoiceIntermediate
consteval vs constexpr
cppconstevalconstexprc++20 - Multiple ChoiceHard
Static initialization order fiasco
cppstatic-initodrinitialization - Multiple ChoiceBeginner
Function-local static init is thread-safe
cppstatic-initthread-safetysingleton - Multiple ChoiceHard
Construct on first use idiom
cppstatic-initsingletoninitialization - Multiple ChoiceIntermediate
Aggregate initialization rules
cppaggregate-initinitialization - Multiple ChoiceIntermediate
Narrowing conversion in braces
cppaggregate-initnarrowinginitialization - Multiple ChoiceIntermediate
inline function ODR exception
cppodrinlinelinker - Multiple ChoiceIntermediate
ODR violation no diagnostic
cppodrundefined-behaviorlinker - Multiple ChoiceIntermediate
inline variables C++17
cppinlineodrc++17 - Multiple ChoiceIntermediate
Template instantiation in TUs
cpptemplatesodrlinker - Multiple ChoiceIntermediate
extern template purpose
cpptemplatesextern-templatecompilation - Multiple ChoiceBeginner
operator<< as friend vs member
cppoperator-overloadingfriend - Multiple ChoiceIntermediate
CRTP static polymorphism
cppcrtptemplatesstatic-polymorphism - Multiple ChoiceIntermediate
Diamond inheritance ambiguity
cppdiamondvirtual-inheritance - Multiple ChoiceHard
Virtual base construction order
cppvirtual-inheritancediamondconstruction - Multiple ChoiceIntermediate
Non-member swap idiom
cppswapadloperator-overloading - Multiple ChoiceIntermediate
atomic default memory order
cppatomicsmemory-modelmemory-order - Multiple ChoiceHard
relaxed atomic does not synchronize
cppatomicsmemory-orderdata-race - Multiple ChoiceHard
acquire-release pairing
cppatomicsmemory-orderacquire-release - Multiple ChoiceBeginner
std::atomic<bool> vs volatile
cppatomicsvolatilememory-model - Multiple ChoiceHard
compare_exchange_weak vs strong
cppatomicscompare-exchangecas - Multiple ChoiceBeginner
Purpose of std::enable_if in overload resolution
templatessfinaeenable_if - Multiple ChoiceBeginner
Structured bindings and reference semantics
structured-bindingsautoc++17 - Multiple ChoiceBeginner
std::optional value semantics on engagement
optionalc++17api - Multiple ChoiceBeginner
Laziness of range views in C++20 ranges
rangesviewslazy - Multiple ChoiceBeginner
Why a base class needs a virtual destructor
virtual-destructorpolymorphismub - Multiple ChoiceBeginner
Rule of zero rationale for resource classes
rule-of-zeroraiismart-pointers - Multiple ChoiceBeginner
RAII core idea for exception safety
raiiexception-safetylifetime - Multiple ChoiceBeginner
Which smart pointer for exclusive ownership
unique-ptrownershipsmart-pointers - Multiple ChoiceBeginner
What happens on a noexcept function throwing
noexceptexceptionsterminate - Multiple ChoiceBeginner
nullptr versus NULL type safety
nullptrapitype-safety - Multiple ChoiceIntermediate
The immediate context rule in SFINAE
sfinaetemplatesoverload-resolution - Multiple ChoiceIntermediate
Requires-clause vs requires-expression with concepts
conceptsc++20requires - Multiple ChoiceIntermediate
decltype of a parenthesized id-expression
decltypelvaluetype-deduction - Multiple ChoiceIntermediate
How std::declval may be used in unevaluated context
declvalsfinaeunevaluated-context - Multiple ChoiceIntermediate
Accessing the wrong alternative in std::variant
variantexceptionsstd-get - Multiple ChoiceIntermediate
Iterator invalidation after unordered_map insert
unordered-mapiterator-invalidationrehash - Multiple ChoiceIntermediate
Why condition_variable wait needs a predicate loop
condition-variablespurious-wakeupconcurrency - Multiple ChoiceIntermediate
Why the Meyers singleton is thread-safe
singletonstatic-initthread-safety - Multiple ChoiceHard
Difference between constinit and constexpr variables
constinitconstexprc++20 - Multiple ChoiceHard
Defaulted spaceship operator semantics detail
three-way-comparisonc++20defaulted-operators - Multiple ChoiceHard
Strict aliasing and type punning legality
strict-aliasingbit_castub - Multiple ChoiceHard
Why compare_exchange_weak is preferred in loops
atomicscaslock-free - Multiple ChoiceHard
How jthread differs from std::thread
jthreadstop-tokenc++20 - Multiple ChoiceHard
Static initialization order fiasco across TUs
static-initodrglobals - Multiple ChoiceBeginner
memory_order_relaxed visibility
atomicsmemory-modelrelaxed
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.