Skip to content · ⁨דלג לתוכן⁩

Reverse 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.

עברית

הפכה במקום

הפוך מחרוזת C במקום — שינה את התווים באותו מערך במקום לבנות מחרוזת חדשה. התנועה הקלאסית: מדד שמאלי בתחילה ומדד ימני בסוף, החלף אותם, ואז צעד את שניהם לכיוון המרכז עד שיפגשו.

Log in or create account · ⁨היכנס או צור חשבון⁩

IGCSE, A-Level & AP