Timeline
timeline
2025-12-24
init
two pointers
Title:
Bubble sort approach:
1 |
|
Two pointers:
- The left pointer points to the end of the already processed sequence, and the right pointer points to the beginning of the sequence to be processed.
- The right pointer keeps moving to the right. Each time the right pointer points to a non-zero number, swap the numbers at the left and right pointers, and move the left pointer to the right.
1 |
|
