InterviewLegend

Big Numbers as Strings

Alex Chen30 min readGuide updated 309 real interview reports

Wayfair's algorithm round runs about an hour on the HackerRank pair-programming portal, and it usually stays on one problem the whole time. You add two numbers given as strings. You can't convert them to int, long, BigInteger or BigDecimal, so the arithmetic happens digit by digit on the characters. Candidates have described this round since 2022, and one called it the standard question across Wayfair.

The parts build on each other. Each follow-up opens as a new tab once the current one passes, and in one account every test case had to pass before the next part unlocked. So the function you write in the first ten minutes is the one the rest of the hour calls. Keep it simple, two strings in and a string out, and handle parsing and formatting in separate steps outside it.

WayfairPremium lesson · Coding round

The 4 Wayfair problems are below.

  1. A Premium questionCoding · Easy · Signature problem
  2. A Premium questionCoding · Medium · Frequently asked
  3. A Premium questionCoding · Medium · Frequently asked

+ 1 more in this lesson

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

Get the Wayfair questions

$49 a year · all 122 companies · instant access

309 Wayfair interview reports · guide updated

Wayfair interview guide

Know what Wayfair asks before you walk in.

30 coding · 4 system design · 24 behavioral questions

Get Premium$49 a year · Instant access
Or start freeNo card.

Get their questions first.

Had your Wayfair interview?How we research

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