algorithms icon indicating copy to clipboard operation
algorithms copied to clipboard

Improve move_zeros algorithm (readability and efficiency)

Open idowujames opened this issue 4 weeks ago • 0 comments

This update improves the move_zeros algorithm by:

  • Using isinstance(i, bool) for cleaner boolean type checking
  • Avoiding temporary list allocation when appending zeros
  • Clearer inline comments of the if-statement
  • Removed the print statement and function call at the end of the code file

idowujames avatar Nov 07 '25 13:11 idowujames