Posted on August 1, 2022August 1, 2022 Description Submission class Solution { public: string generateTheString(int n) { if(n % 2 == 1) return string(n, 'a'); return string(n-1, 'a') + string(1, 'b'); } }; By Bill0412 Easy LeetCode