The assessment lasted 100 minutes and consisted of two very different questions: a dynamic programming problem involving merging two strings while minimizing priority conflicts, and a repository debugging exercise involving recurring payments in a Django application.
Interview Details
Question 1 — Minimum Merge Conflicts
The first question was an algorithmic problem involving two development branches, represented by strings named primary and secondary. Each lowercase letter represented a commit priority, with alphabetically smaller characters indicating higher priority.
I was asked to merge the two branches into a single string while preserving the original relative order of characters within each branch. The objective was to minimize the number of priority conflicts in the resulting merged sequence.
Problem Description
A conflict occurs when a lower-priority commit appears before a higher-priority commit in the merged string. Since smaller letters have higher priority, a conflict occurs whenever an alphabetically larger character appears before a smaller character.
The merge must preserve the order of characters within both original strings. I could interleave characters from the two branches, but I couldn't rearrange the commits within either branch.
The required function was:
getMinimumConflicts(primary, secondary)
The function needed to return the minimum number of conflicts across all valid merges.
All three merges preserve the order of d and b from the primary branch. However, their conflict counts differ depending on where the character a from the secondary branch is inserted.
The minimum possible conflict count is 1, achieved by "adb". The remaining conflict occurs because d appears before the higher-priority character b.
Constraints
1 <= primary.length <= 1000
1 <= secondary.length <= 1000
Both strings contain only lowercase English letters.
The relative order of characters within each original string must be preserved.
Question 2 — Full-Stack Debugging:
Unlock Full Details
Create a free account to unlock this interview experience report.