✅ C++ || Explained [Easy to Understand || Beginner || BFS
Approach\n\nThis is a quite easy to implement kind of problem!!!\n\nThere is nothing special or hidden in the problem statement , do what is mentioned...\n\nWe 
# ***Approach***\n```\nThis is a quite easy to implement kind of problem!!!\n\nThere is nothing special or hidden in the problem statement , do what is mentioned...\n\nWe are required to find the lexiographically smallest string that can be formed from string s\n\nWhat we will do is create all possible strings and return the lexiographically smallest one we encountered!!!\n    \nFor a string s : we can have 2 childs\n                    first_child : formed by applying operation 1 on parent string\n                    second_child : formed by applying operation 2 on parent string\n                    we only push those strings to queue that are not seen yet!!![to avoid infinite loop]\nNOTE : I have used BFS , u can also use DFS , it will work fine!!!\n```\n# ***Code***\n```\nclass Solution {\npublic:\n    string findLexSmallestString(string str, int a, int b) {\n        unordered_set<string> seen; // to keep track of seen strings\n        queue<string> q;\n        q.push(str);\n        \n        string lex_smallest_string = str;\n        \n        while(q.empty() == false) //simple-bfs\n        {\n            string s = q.front();\n            q.pop();\n\n            lex_smallest_string = min(lex_smallest_string , s);\n\n            // Pushing all those childs which are not seen yet!!!\n            // 1st child is formed by applying operation 1 on string\n            // 2nd child is formed by applying operation 2 on string\n\n            string first_child = apply_operation_1(s , a);\n            if(seen.find(first_child) == seen.end())\n                q.push(first_child) , seen.insert(first_child);\n\n            string second_child = apply_operation_2(s , b);\n            if(seen.find(second_child) == seen.end())\n                q.push(second_child) , seen.insert(second_child);\n        }\n        return lex_smallest_string;\n    }\n    \n    string apply_operation_1(string s , int a)\n    {\n    // Operation 1 : states that increasing all odd indices of string a times!!!!\n        for(int i = 1 ; i < s.size() ; i += 2)\n            s[i] = (s[i] - \'0\' + a) % 10 + \'0\';\n        return s;\n    }\n    \n    string apply_operation_2(string s , int b)\n    {\n    // Operation 2 : states that we have to rotate string to right b times!!!!!\n        string res(s.size() , \' \');\n        for(int i = 0 ; i < s.size() ; ++i)\n            res[(i + b) % s.size()] = s[i];\n        return res;\n    }\n};\n```\n# ***If you liked the solution, Please Upvote!!!***
['Breadth-First Search', 'C']