Home To Lower Case
Post
Cancel

To Lower Case

Links

Go to my solution
Go to the question on LeetCode

My Thoughts

What Went Well
The solution was simple and intuitive.

Solution Statistics

Time Spent Coding
10 seconds

Time Complexity
O(n) - Each element of the input string must be visited, resulting in the O(n) time complexity.

Space Complexity
O(1) - We are not creating new variables, resulting in the O(n) space complexity.

Runtime Beats
100% of other submissions

Memory Beats
100% of other sumbissions

Solution

1
2
3
class Solution:
    def toLowerCase(self, s: str) -> str:
        return s.lower()
This post is licensed under CC BY 4.0 by the author.

Group Anagrams

Valid Sudoku