algorithms
algorithms copied to clipboard
Improve move_zeros algorithm (readability and efficiency)
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