Skip to main content
4 votes
Accepted

Leetcode: Number of Islands - BFS (Queue vs Recursion)

Performance Figures First of all, regarding these figures in milliseconds. They can be useful, to indicate whether something is wrong with the algorithm, but they can hardly be considered accurate. ...
Alexander Ivanchenko's user avatar
2 votes

Printing longest sequence of zeroes

Optional abuse In the code you shared, Optional is used only to create a chain of method calls and avoid writing conditional ...
Alexander Ivanchenko's user avatar
1 vote

Performance Tuning to enable answer for Project Euler #566 "Cake Icing Puzzle"

your code for definition needs a lot of cycles (this makes it slow); to make it faster you need to use more efficient formulas or a different language like c or c++. If you want to use python, I ...
AsrtoMichi's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible