Solving String Without AAA or BBB in go. Please try yourself first to solve the problem and submit your implementation to LeetCode before looking into solution.

Problem Description

Example 1:

Input: A = 1, B = 2
Output: "abb"
Explanation: "abb", "bab" and "bba" are all correct answers.

Example 2:

Input: A = 4, B = 1
Output: "aabaa"

Note:

  1. 0 <= A <= 100
  2. 0 <= B <= 100
  • 0 <= A <= 100
  • 0 <= B <= 100

See the full details of the problem String Without AAA or BBB at LeetCode

Originally posted at: @github.com/halfrost/LeetCode-Go