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
1,575 challenges matching your filters
- Code AnalysisHard
Cross-TU static init order
cppstatic-initodrundefined-behavior - Code AnalysisBeginner
remove vs erase semantics
cppalgorithmserase-removecode-analysis - Code AnalysisIntermediate
Lambda returning reference to by-value capture
cpplambdadanglingreferences - Code AnalysisBeginner
unique_ptr copy attempt
cppsmart-pointersunique_ptrcode-analysis - Code AnalysisIntermediate
Virtual call during destruction
cppvirtualdestructorcode-analysis - Code AnalysisIntermediate
unordered_map pointer survives rehash
cppstlunordered_mapiterator-invalidation - Code AnalysisBeginner
Signed integer overflow
cppundefined-behaviorinteger-overflowcode-analysis - 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 AnalysisHard
Lifetime extension of temporary subobject binding
cppreferenceslifetimetemporary - Code AnalysisHard
Missing std::forward loses rvalueness
cpptemplatesperfect-forwardingstd-forward - Code AnalysisIntermediate
new[] / delete mismatch
cppundefined-behaviornew-deletecode-analysis - Code AnalysisHard
Exception-unsafe member update
cppexception-safetycode-analysis - Code AnalysisIntermediate
Range-for over returning-by-value container
cpprange-forlifetimecode-analysis - Code AnalysisBeginner
vector<bool> auto deduction
cppstlvector-boolauto - Code AnalysisHard
static_cast vs dynamic_cast downcast
cppcastingundefined-behaviorcode-analysis - Code AnalysisBeginner
dynamic_cast requires polymorphic type
cppcastingrtticode-analysis - Code AnalysisIntermediate
Two-mutex lock-order deadlock
cppthreadingdeadlockmutex - Code AnalysisBeginner
condition_variable wait predicate
cppthreadingcondition-variablespurious-wakeup - Code AnalysisIntermediate
volatile increment not atomic
cppatomicsvolatiledata-race - Code AnalysisHard
Relaxed store publish bug
cppatomicsmemory-ordercode-analysis - Code AnalysisBeginner
reserve prevents reallocation
cppstlvectorreserve - Code AnalysisBeginner
Missing return in non-void function
cppundefined-behaviorcode-analysis - Code AnalysisBeginner
operator[] inserts default element
cppstlmapoperator-subscript - Code AnalysisBeginner
map::at vs operator[] on missing
cppstlmapcode-analysis - Code AnalysisHard
initializer_list in emplace_back
cppstlemplacebraced-init - Code AnalysisIntermediate
Detached thread using this
cppthreadingdanglinglambda - Code AnalysisIntermediate
std::thread destructor terminate
cppthreadingstd-threadcode-analysis - Code AnalysisHard
Self-deadlock non-recursive mutex
cppthreadingmutexdeadlock - Code AnalysisBeginner
unique_lock needed for condition_variable
cppthreadingcondition-variableunique-lock - Code AnalysisBeginner
sizeof empty class
cppsizeofcode-analysis - Code AnalysisIntermediate
sizeof object with vptr
cppsizeofvtablecode-analysis - Code AnalysisHard
Lifetime extension of returned-by-value ref
cppreferenceslifetimetemporary - Code AnalysisHard
Lambda in loop capturing by reference
cpplambdacapturegotcha - Code AnalysisBeginner
Lambda capturing loop var by value
cpplambdacapturecode-analysis - Code AnalysisHard
string_view elements dangle
cppstring_viewdanglinglifetime - Code AnalysisIntermediate
constexpr used as array bound
cppconstexprarraycode-analysis - Code AnalysisHard
Header function missing inline
cppodrinlinelinker - Code AnalysisIntermediate
vector uses copy when move may throw
cppexception-safetynoexceptvector - Code AnalysisBeginner
Copy-init from derived to base object
cppobject-slicingvirtualcode-analysis - Code AnalysisIntermediate
Infinite loop optimized away
cppatomicsundefined-behavioroptimization - Code AnalysisBeginner
Use after move of string
cppmove-semanticsmoved-fromcode-analysis - Code AnalysisBeginner
Returning data() pointer of local vector
cppdanglingstlvector - Code AnalysisIntermediate
Calling empty std::function
cppstd-functioncode-analysis - Code AnalysisHard
weak_ptr use_count check is racy
cppsmart-pointersweak_ptrthread-safety - Code AnalysisHard
Forwarding reference deduction
cpptemplatesforwarding-referencecode-analysis - Code AnalysisHard
decltype(auto) vs auto
cppautodecltypetype-deduction - Code AnalysisIntermediate
No implicit void* conversion
cpptypingvoid-pointercode-analysis - Code AnalysisBeginner
Lambda capture by reference outliving its scope
lambdacapturedangling - Code AnalysisBeginner
Missing virtual destructor deleted through base
virtual-destructorpolymorphismub - Code AnalysisBeginner
Unsigned underflow in a countdown loop
unsigned-underflowloopsout-of-bounds - Code AnalysisBeginner
Range-for over a temporary container
string-viewrange-fordangling - Code AnalysisBeginner
Memory leak from an early return
raiileakraw-pointer - Code AnalysisBeginner
Slicing when passing derived by value
object-slicingpolymorphismpass-by-value - Code AnalysisIntermediate
Iterator invalidation while erasing in a vector loop
iterator-invalidationvectorerase - Code AnalysisIntermediate
Dangling pointer to a local vector's data
dangling-pointervectorlifetime - Code AnalysisIntermediate
Attempting to copy a unique_ptr
unique-ptrmove-onlycompile-error - Code AnalysisIntermediate
Cross-thread visibility with a relaxed flag
memory-orderatomicsdata-race - Code AnalysisIntermediate
Self-deadlock from locking a non-recursive mutex twice
deadlockmutexconcurrency
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.