PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Coding & Algorithms/Samsung

Validate palindrome with constraints

Last updated: Mar 29, 2026

Quick Overview

This question evaluates a candidate's ability to implement string-processing algorithms and two-pointer techniques under O(n) time and O(1) extra space constraints, including character filtering, case normalization, edge-case handling, and algorithmic complexity analysis.

  • Medium
  • Samsung
  • Coding & Algorithms
  • Machine Learning Engineer

Validate palindrome with constraints

Company: Samsung

Role: Machine Learning Engineer

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Technical Screen

Given a string s, return true if s reads the same forward and backward after removing all non-alphanumeric characters and ignoring letter case. Implement an O (n)-time, O( 1)-extra-space solution using two pointers. Follow-ups: (a) Modify your solution to return true if s can become a palindrome after deleting at most one character; (b) Discuss how you would support full Unicode (e.g., combining marks and non-ASCII letters); (c) Provide test cases and analyze complexity.

Quick Answer: This question evaluates a candidate's ability to implement string-processing algorithms and two-pointer techniques under O(n) time and O(1) extra space constraints, including character filtering, case normalization, edge-case handling, and algorithmic complexity analysis.

Related Interview Questions

  • Maximize sum of non-adjacent values - Samsung (medium)
  • Count islands in a binary grid - Samsung (easy)
Samsung logo
Samsung
Sep 6, 2025, 12:00 AM
Machine Learning Engineer
Technical Screen
Coding & Algorithms
1
0

Given a string s, return true if s reads the same forward and backward after removing all non-alphanumeric characters and ignoring letter case. Implement an O (n)-time, O( 1)-extra-space solution using two pointers. Follow-ups: (a) Modify your solution to return true if s can become a palindrome after deleting at most one character; (b) Discuss how you would support full Unicode (e.g., combining marks and non-ASCII letters); (c) Provide test cases and analyze complexity.

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Samsung•More Machine Learning Engineer•Samsung Machine Learning Engineer•Samsung Coding & Algorithms•Machine Learning Engineer Coding & Algorithms
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.