Strings & Hashing
After the array problem, the next thing an IBM assessment tends to hand you is a string. A username to validate, maybe, or a log line to parse. Sometimes it's a form field that has to line up with another field. Almost every one of them gets solved by counting characters and reading the tallies, or by dropping things into a hash set so "have I seen this before" costs nothing. That's why strings and hashing travel as a pair. Together they're close to 28% of IBM's coding, in a near tie with the grouping cluster for second place behind arrays.
The venue is the same HackerRank screen the arrays live on: commonly two problems in about sixty minutes, rated easy to medium, scored by an autograder that either passes your code or does not. These problems read as friendly. The traps sit quietly in the hidden tests: the empty string, a mix of upper and lower case, the character that shows up exactly once, two inputs of different length. A frequency map that survives those corners scores. A slick one-liner that silently assumes lowercase ASCII fails on the input it never pictured.
- 3 problems, worked step by step
- about 28 min
Premium lessonIBM interview guide
These took digging.
What candidates walked out with, from 20,000+ reports, forum threads behind logins and write-ups in Chinese. Then solved step by step.
100 companies. Checked every month.
Unlock all 100 companies$49 a year · less than $1 a week · Cancel anytime
IBM interview guideKnow what IBM asks before you walk in.
14 coding · 3 system design · 13 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.