Code
Loading editor...
Tap Analyze to see visualization
Click Analyze to visualize
See step-by-step execution, variables, and output
Variables
Run code to see variables
Output
Console output will appear here
Click Analyze to visualize
See step-by-step execution, variables, and output
Run code to see variables
Console output will appear here
Use two pointers that move toward each other from both ends. Advance each pointer until it finds a vowel, then swap the vowels and continue inward.
Converging pointers ensure each vowel pair is swapped exactly once while non-vowels are skipped and left untouched.
Updated Feb 2026