Capital One·Software Engineer·Technical Phone Screen
- Given two equal-length strings s1 and s2, build a new string by iterating through each index i: always append s1[i], then if s1[i] equals s2[n-1-i] append that character again, otherwise append s2[n-1-i]. Return the resulting string.
- A robot moves on a 2D grid with walls, healing cells, and monster cells. Starting with a fixed health value, find the shortest path from start to goal where health never reaches zero or below. Return the shortest distance or the path.
- Solve a problem on an array or string using a sliding window approach to satisfy a given constraint.
“Took me a minute to parse the comparison logic since you're comparing against the mirrored index in s2, not the same index.”