Java with human readable variable names
Intuition\nFor each dfs, do either:\n- Right rotation b times\n- Update all odd indices with a \n\n# Code\n\nclass Solution {\n    String min;\n\n    public Str
# Intuition\nFor each dfs, do either:\n- Right rotation b times\n- Update all odd indices with a \n\n# Code\n```\nclass Solution {\n    String min;\n\n    public String findLexSmallestString(String s, int a, int b) {\n        min = "9".repeat(s.length());\n        helper(s, a, b, new HashSet<>());\n        return min;\n    }\n\n    private void helper(String from, int a, int b, Set<String> visited) {\n        if (from.compareTo(min) < 0) min = from;\n        if(!visited.add(from)) return;\n\n        String updated = rotate(from, b);\n        helper(updated, a, b, visited);\n\n        updated = addOddIndices(from, a);\n        helper(updated, a, b, visited);\n    }\n\n    private String addOddIndices(String from, int val) {\n        char[] chars = from.toCharArray();\n        for (int i = 1; i < from.length(); i += 2) {\n            chars[i] = (char) ((chars[i] - \'0\' + val) % 10 + \'0\');\n        }\n        return new String(chars);\n    }\n\n    private String rotate(String from, int times) {\n        int n = from.length();\n        times %= n;\n        return from.substring(n - times) + from.substring(0, n - times);\n    }\n\n}\n```
['Java']