Challenge Library
Coding Challenges
5,893 curated questions across every arena — browse by topic, then jump into a live 3-minute battle to put them to the test.
Filter by type
Filter by difficulty
Popular topics
60 challenges matching your filters
Clear topic filter- Code AnalysisIntermediate
Deleting derived through base pointer
cppvirtualdestructorundefined-behavior - Code AnalysisIntermediate
Capture by reference outliving scope
cpplambdacapturedangling - Code AnalysisIntermediate
Dangling reference in std::async
cppasynclambdacapture - Code AnalysisIntermediate
Return local by value
cpprvoreturncode-analysis - Code AnalysisIntermediate
Lambda returning reference to by-value capture
cpplambdadanglingreferences - Code AnalysisIntermediate
Virtual call during destruction
cppvirtualdestructorcode-analysis - Code AnalysisIntermediate
unordered_map pointer survives rehash
cppstlunordered_mapiterator-invalidation - Code AnalysisIntermediate
Reference to vector element across growth
cppstlvectordangling - Code AnalysisIntermediate
Brace init narrowing error
cppaggregate-initnarrowingcode-analysis - Code AnalysisIntermediate
const member mutating through pointer
cppconst-correctnesspointersgotcha - Code AnalysisIntermediate
new[] / delete mismatch
cppundefined-behaviornew-deletecode-analysis - Code AnalysisIntermediate
Range-for over returning-by-value container
cpprange-forlifetimecode-analysis - Code AnalysisIntermediate
Two-mutex lock-order deadlock
cppthreadingdeadlockmutex - Code AnalysisIntermediate
volatile increment not atomic
cppatomicsvolatiledata-race - Code AnalysisIntermediate
Detached thread using this
cppthreadingdanglinglambda - Code AnalysisIntermediate
std::thread destructor terminate
cppthreadingstd-threadcode-analysis - Code AnalysisIntermediate
sizeof object with vptr
cppsizeofvtablecode-analysis - Code AnalysisIntermediate
constexpr used as array bound
cppconstexprarraycode-analysis - Code AnalysisIntermediate
vector uses copy when move may throw
cppexception-safetynoexceptvector - Code AnalysisIntermediate
Infinite loop optimized away
cppatomicsundefined-behavioroptimization - Code AnalysisIntermediate
Calling empty std::function
cppstd-functioncode-analysis - Code AnalysisIntermediate
No implicit void* conversion
cpptypingvoid-pointercode-analysis - Multiple ChoiceIntermediate
std::move in return statement pessimizes
cpprvomove-semanticsanti-pattern - Multiple ChoiceIntermediate
Declared move ctor disables implicit copy
cpprule-of-fivespecial-member-functions - Multiple ChoiceIntermediate
make_shared weak_ptr memory retention
cppsmart-pointersmake_sharedweak_ptr - Multiple ChoiceIntermediate
shared_ptr cycle leak
cppsmart-pointersshared_ptrweak_ptr - Multiple ChoiceIntermediate
shared_ptr thread safety scope
cppsmart-pointersthread-safetyshared_ptr - Multiple ChoiceIntermediate
const and the trailing return / APIs
cppconst-correctnessapi-design - Multiple ChoiceIntermediate
Top-level const in function parameters
cppconst-correctnessfunction-types - Multiple ChoiceIntermediate
vtable pointer location
cppvtableabi - Multiple ChoiceIntermediate
Calling virtual from constructor
cppvirtualconstructiongotcha - Multiple ChoiceIntermediate
void_t detection idiom
cpptemplatessfinaevoid_t - Multiple ChoiceIntermediate
Two-phase name lookup
cpptemplatestwo-phase-lookuptypename - Multiple ChoiceIntermediate
Dependent base member access
cpptemplatesdependent-nametwo-phase-lookup - Multiple ChoiceIntermediate
map insert hint with end()
cppstlmaphint - Multiple ChoiceIntermediate
vector<bool> proxy reference
cppstlvector-boolproxy - Multiple ChoiceIntermediate
Strong guarantee via copy-and-swap
cppexception-safetycopy-and-swap - Multiple ChoiceIntermediate
noexcept effect on move_if_noexcept
cppexception-safetyvectornoexcept - Multiple ChoiceIntermediate
Throwing from a noexcept function
cppnoexceptexception-safety - Multiple ChoiceIntermediate
Destructors are implicitly noexcept
cppnoexceptdestructorexception-safety - Multiple ChoiceIntermediate
Stateless lambda to function pointer
cpplambdafunction-pointer - Multiple ChoiceIntermediate
Generic lambda and auto capture
cpplambdageneric-lambdac++14 - Multiple ChoiceIntermediate
optional value access errors
cppoptionalstl - Multiple ChoiceIntermediate
any heap allocation properties
cppanystlc++17 - Multiple ChoiceIntermediate
string_view not null-terminated
cppstring_viewc-apilifetime - Multiple ChoiceIntermediate
Member reordering changes sizeof
cppalignmentpaddingsizeof - Multiple ChoiceIntermediate
alignas effect
cppalignmentalignasfalse-sharing - Multiple ChoiceIntermediate
Member pointer size
cppsizeofpointer-to-memberabi - Multiple ChoiceIntermediate
consteval vs constexpr
cppconstevalconstexprc++20 - 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 ChoiceIntermediate
CRTP static polymorphism
cppcrtptemplatesstatic-polymorphism - Multiple ChoiceIntermediate
Diamond inheritance ambiguity
cppdiamondvirtual-inheritance - Multiple ChoiceIntermediate
Non-member swap idiom
cppswapadloperator-overloading - Multiple ChoiceIntermediate
atomic default memory order
cppatomicsmemory-modelmemory-order
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 — 3-minute matches, Elo ranking, and badge tiers on the line.