← All problemsSign in

Is this Graph

You have a set of numbers **S** from **1** to **10** {1,2,3 ... ,10} and a number **A** and **B** You may perform the following operation on this number **A**: Replace number **A** with any one of the following : **2A**, **4A**, **A/2**, **A/4**, **A+1**, **A-1**. Any sequence of operations should always lead to a number within this set **S** at any point of time. (Example: you cannot apply x4 to

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start