709. To Lower Case 發表於 2023-02-13 | 分類於 leetcode problemsolution1234567891011class Solution {public: string toLowerCase(string s) { string str; for(char c: s){ if(c>='A' && c<='Z') c+=32; str+=c; } return str; }}; analysis time complexity O(n) space complexity O(1)