1625 | JavaScript stack-based solution
Largely indistinguishable from the other similar solutions. But I still find a\nway to bring some of that 1-line energy to it.\n\nMaybe this slightly different 
Largely indistinguishable from the other similar solutions. But I still find a\nway to bring some of that 1-line energy to it.\n\nMaybe this slightly different example will make more sense for some people.\n\n> Runtime: **336 ms**, faster than _70.42%_ of JavaScript online submissions\n> Memory Usage: **56.3 MB**, less than _5.63%_ of JavaScript online submissions\n\n```javascript\n/**\n * @param {string} str\n * @param {string} n\n * @returns {string}\n */\nconst add = (str, n) =>\n  [...str]\n    .map((char, idx) => (0 === idx % 2 ? char : (Number(char) + n) % 10))\n    .join(\'\');\n\n/**\n * @param {string} str\n * @param {number} n\n * @returns {string}\n */\nconst rotate = (str, n) => `${str}${str}`.slice(n, str.length + n);\n\n/**\n * @param {string} s\n * @param {number} a\n * @param {number} b\n * @return {string}\n */\nconst findLexSmallestString = (s, a, b) => {\n  const stk = [s];\n  const done = new Set();\n  let min = s;\n  while (stk.length) {\n    const curr = stk.pop();\n    min = min.localeCompare(curr) < 0 ? min : curr;\n    const [added, rotated] = [add(curr, a), rotate(curr, b)];\n    if (!done.has(added)) stk.push(added) && done.add(added);\n    if (!done.has(rotated)) stk.push(rotated) && done.add(rotated);\n  }\n  return min;\n};\n```\n
['Stack', 'JavaScript']