Leetcode June 10, 2025 -- Problem #3442
Welcome to my coding blog! I'll mostly be posting about my experiences with Leetcode's daily problems for now, but if any other interesting coding projects come up then I'll definitely post about them here. I'm posting a day behind on the Leetcode problems, so today's problem is #3442, "Maximum Difference Between Even and Odd Frequency I". Take a look at the problem, and then we'll get started: https://leetcode.com/problems/maximum-difference-between-even-and-odd-frequency-i/description/ Right away, I can see that this is going to revolve around looping procedures and string indexing. Seems like a job for Python. My first thought was to create a list of all 26 English characters and iterate through them one by one. However, it occured to me that, by just keeping track of whether a given character has already been analyzed, we can actually use the string itself as a map of all possible characters! As a bonus, this extends it from working with english l...