Skip to content · ⁨Pular para o conteúdo⁩

Reverse in place · ⁨Inverter in-place⁩

English

Reverse in place

Reverse a C-string in place — change the characters in the same array rather than building a new string. The classic move: a left index at the start and a right index at the end, swap them, then step both toward the middle until they meet.

Português

Inverta in loco

Inverta uma string C in loco — altere os caracteres no mesmo array em vez de construir uma nova string. O movimento clássico: um índice esquerdo no início e um direito no fim, troque-os, depois mova ambos em direção ao centro até se encontrarem.

Log in or create account · ⁨Entrar ou criar conta⁩

IGCSE, A-Level & AP