InterviewLegend

String Basics

Alex Chen35 min readUpdated 55 real interview reports

Strings open a lot of Fidelity coding rounds. US new-grad, intern and associate candidates get a short task like the five below, often on a whiteboard or a plain notepad with no compiler. India technical rounds use the same tasks as a warmup before the Java questions. None of them is hard, but a senior engineer reads your code line by line, the way they'd read a pull request, and asks why you picked each type.

Two Java details come up across all five. A String can't change, so any in-place work happens on a char[]. The map also has to fit the answer. A plain HashMap has no order, while a LinkedHashMap or an int[] indexed by character keeps the order that a "first" or "in order" answer needs.

Java is the safe default here, since the follow-ups often turn on details like String immutability or LinkedHashMap order. If the panel lets you call a built-in, use it, and be ready to write the loop by hand when they ask again without it.

FidelityPremium lesson · Coding round

The 5 Fidelity problems are below.

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

+ 2 more in this lesson

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

Get the Fidelity 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 Fidelity interview?Tell us what they asked. Reviewed before it goes in, never with your name.
Fidelity interview guide

Know what Fidelity asks before you walk in.

29 coding · 1 system design · 15 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.