Minimize steps required to convert number N to M using arithmetic operators

  #include using namespace std;  string changeNtoM(int N, int M){        if (N == M) {        return ” “;    }          if (M == 0) {        return “-“;    }          queue q;          unordered_map visited;          q.push({ N, “” }), visited[N] = 1;          q.push({ 1, “/” }), visited[1] = 1;          while (!q.empty()) {                pair cur = q.front();        q.pop();                                  if (cur.first == M) {                        return cur.second;        }                          if (!visited[cur.first + cur.first]            && cur.first + cur.first