BFS:Modeled strings as states,sorted every valid substring,and used a queue+visited set for min operations.Correct,but TLE due to state explosion.
Optimization:Mathematical conditions using min/max characters.#LeetCode#DSA#Cpp#Algorithms#ProblemSolving#CompetitiveProgramming
Started optimizing problems from brute force first principles thinking.
My process:
1 .Write brute force first
2 .Find bottlenecks
3 .Optimize step-by-step
4 .Refine for edge cases
Brute force is the foundation, not a failure.
#Algorithms#Programming#CodeOptimization
I completed my high school this year, got towards learning software development . Here is the first step of my learning achievement. I earned my Github Foundations badge this summer!