bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths

Loading lesson path

Learn/C++/Practice
C++•Practice

C++ Practice: Spot the Bug

Open the puzzle, solve it, then come back for the next repetition.

FocusDetails
LanguageC++
ProblemTwo Sum
DifficultyEasy
Puzzle modespot bug
GoalFind the broken line or failing branch before reading the explanation.

Bugl practice

Start Two Sum practice

Start practice

Practice Task

  • Read the code or evidence panel before answering.
  • Submit the answer in the Bugl puzzle UI.
  • Use the explanation to name the exact rule or pattern you missed.

Problem brief: Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same element twice. You can return the answer in any order.

Previous

C++ Practice: Fill the Gap

Next

C++ Practice: Order the Logic