LeetCode Daily Problem P2169 Number of Operations to Make 0 even6292025-11-09 (Updated: 2025-11-09) algorithmLeetCode Daily Challenge, Simulation, algorithm Timeline timeline2025-11-09init simulation Problem:P2169 get 0 number of operationshttps://leetcode.cn/problems/count-operations-to-obtain-zero/description/?envType=daily-question&envId=2025-11-09Weekend bonus problem12345678910111213141516#include <algorithm>class Solution { public: int countOperations(int num1, int num2) { int ops = 0; while (num1 != 0 && num2 != 0) { if (num1 < num2) { //num1 is the larger one std::swap(num1, num2); } num1 = num1 - num2; ops++; } return ops; }};