Palindrome Check
برمجةانترفيو تقنيسهلآخر مرة اتسأل من سنة
سؤال انترفيو في طلبات (مصر) · المرحلة: انترفيو تقني · المجال: برمجة · الوظيفة: مهندس برمجيات · الصعوبة: سهل · اتسأل مرة واحدة، آخرها سبتمبر 2025
What they ask
A warm-up in the coding round: given a string, return whether it reads the same forwards and backwards. The interviewer then tightens it: ignore case, ignore non-alphanumeric characters, and do it without building a reversed copy.
Because this round is about how you work rather than the puzzle, they expect you to write a test first (they care about TDD), then the implementation, then refactor.
Examples
"level"returnstrue."Talabat"returnsfalse."A man, a plan, a canal: Panama"returnstrueonce punctuation and case are ignored.""returnstrue.
Constraints
- Up to
10^5characters. - O(n) time, O(1) extra space for the two-pointer version.
What they look for
- Starting from tests, small commits, readable names.
- Two pointers moving inward, skipping non-alphanumerics, comparing lowercase.
- Asking clarifying questions (Unicode? whitespace?) before coding.
- Talking through the second problem they add in the same session, typically sum of the two smallest numbers or moving zeros in an array.