InterviewDB Experience

Split SMS: Break a Long Message into Valid SMS Segments

Interview Experience

Problem An SMS message can be at most 160 characters. If a message is longer, it must be split into parts, each suffixed with " (X/N)" where X is the part number and N is the total number of parts. The suffix counts toward the 160-character limit. Return the list of message segments. Follow-ups The suffix length depends on N, which depends on the split — is there a circular dependency? How do you resolve it? How would you split on word boundaries rather than arbitrary character positions? Extend…

Full Details

🔒

Unlock all Faire questions

Full insider details, leaked discussions, and candidate experiences.

Get full access — $100 a year, unlimited access

About This Question

This is a candidate experience report from a faire interview during the onsite round.

It covers the following topics: Coding, Onsite .