You could try a beginner 'lightweight formal methods' book then learn how to make a model of whatever LeetCode algorithm you optimized and test it for correctness https://forge-fm.github.io/book/2026/
Then you can check other LC solutions for bugs not caught by the test inputs because FM software like forge can find very tricky logic errors
Could also find some algorithm engineering course floating around and try and optimize a LeetCode solution you made for your specific hardware or their judging server learning what benchmarks to use. MIT has one but probably others: https://jshun.csail.mit.edu/6506-f26/schedule.html or if LC doesn't allow to download test inputs try competition programming archives they give you the test data https://usaco.org/index.php?page=training
With AI writing an entire algorithm test bench is pretty easy but what do you test, what stats are meaningful, vectorized registers, all those real world things.
You could try a beginner 'lightweight formal methods' book then learn how to make a model of whatever LeetCode algorithm you optimized and test it for correctness https://forge-fm.github.io/book/2026/
Then you can check other LC solutions for bugs not caught by the test inputs because FM software like forge can find very tricky logic errors
Could also find some algorithm engineering course floating around and try and optimize a LeetCode solution you made for your specific hardware or their judging server learning what benchmarks to use. MIT has one but probably others: https://jshun.csail.mit.edu/6506-f26/schedule.html or if LC doesn't allow to download test inputs try competition programming archives they give you the test data https://usaco.org/index.php?page=training
With AI writing an entire algorithm test bench is pretty easy but what do you test, what stats are meaningful, vectorized registers, all those real world things.