Skip to content · ⁨ข้ามไปยังเนื้อหา⁩

Reverse in place · ⁨กลับด้านใน 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.

ไทย

กลับหัวใน-place

กลับหัว C-string in place — เปลี่ยนตัวอักษรใน array เดิมแทนการสร้าง string ใหม่ การเคลื่อนไหวคลาสสิก: index ทางซ้ายที่จุดเริ่มต้นและ index ทางขวาที่จุดสุดท้าย สลับกัน แล้วขั้นทั้งสองเข้าหาจุดกึ่งกลางจนกว่าจะพบกัน

Log in or create account · ⁨เข้าสู่ระบบหรือสร้างบัญชี⁩

IGCSE, A-Level & AP