CODE
Given two strings (lowercase English letters), primary and secondary, with lengths m and n respectively, try to merge them into one string:
- Keep the original order within each string
- A smaller character has higher priority
A conflict is defined as the case where a character with low priority is merged before a character with high priority in the final merged string.
For example, if the merged string = "zab", the number of conflicts is 2.
Find the minimal number of conflicts.
Input: the two strings
Output: the minimum number of conflicts
2 AI Spring Boot
Fix bugs in a Movie search backend. The logic is complicated:
- Partial match
- Match movie title, stars, or ALL
- Ignore lower/upper case
- Sort by popularity and others
- Only published movies
Discussion
Loading comments…