InterviewLegend

Anagrams and String Checks

Alex Chen40 min readUpdated

Chewy asks a lot of small string questions. On one HackerRank screen, an anagram question came in two parts, and the second built on the code the candidate had just written. Another string check came up in a final panel, and a new-grad loop used a string problem for live coding.

Letter counts settle the anagram problems. The other two need two indexes or a running total, and nothing from the standard library that would do the work for you.

None of these is hard on its own, but hidden tests check edge cases the prompt doesn't mention, like an empty string or a range that starts at index 0. Say them out loud before you type.

ChewyPremium lesson · Coding round

The 4 Chewy problems are below.

  1. A Premium questionCoding · Easy
  2. A Premium questionCoding · Easy
  3. A Premium questionCoding · Medium

+ 1 more in this lesson

Each with hints, the follow-up and a tested solution.

Get the Chewy questions

$49 a year · all 100 companies · cancel anytime

From 20,000+ candidate reports, forum threads behind logins and write-ups in Chinese.

Had your Chewy interview?Tell us what they asked. Reviewed before it goes in, never with your name.
Chewy interview guide

Know what Chewy asks before you walk in.

30 coding · 1 system design · 28 behavioral questions

Get Premium$49 a year · Cancel anytime
Or start freeNo card.

Get their questions first.

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.