Easy || Java Solution || BFS
The idea is to generate all possible strings and keep a record of the smallest string found so far.\nThis can be done like this: for a parent string, there can 
The idea is to generate all possible strings and keep a record of the smallest string found so far.\nThis can be done like this: for a parent string, there can be 2 child strings by applying operation 1 and operation 2.  So here we can use either BFS or DFS to iterate all strings found and while iterating keep a record of previously found strings to prevent going into an infinite loop.\n```\n\tstatic String op1(String str, int a){\n        char[] arr = str.toCharArray();\n        for(int i=1;i<arr.length;i+=2){\n            arr[i] = (char)((arr[i] -\'0\'+a)%10 +\'0\');\n        }\n        return String.valueOf(arr);\n    }\n    \n    static String op2(String str, int b){\n        return str.substring(str.length()-b) + str.substring(0,str.length()-b);\n    }\n    \n    public String findLexSmallestString(String s, int a, int b) {\n        \n        Queue<String> q = new LinkedList<String>();\n        HashSet<String> hs = new HashSet<String>();\n        q.add(s);\n        String min_str = s;\n        while(!q.isEmpty()){\n            String str = q.remove();\n            if(str.compareTo(min_str)<0) min_str = str;\n            String s1 = op1(str,a);\n            if(!hs.contains(s1)){\n                q.add(s1);\n                hs.add(s1);\n            }\n            String s2 = op2(str,b);\n            if(!hs.contains(s2)){\n                q.add(s2);\n                hs.add(s2);\n            }\n        }\n        return min_str;\n    }\n\t\n```
['String', 'Breadth-First Search', 'Java']