Great interviewer with enthusiastic and professional.
The code interview was not that easy but the problem is of high quality.
In the second round, we went through lots of details about previous working experience, and the interviewer, also the team leader, was very enthusiastic about his work.
Given two alphabet strings str1 and str2. You can change the characters in str1 to any alphabet characters in order to transform str1 to str2. One restriction is, in each operation, you should change all the same characters simultaneously.
What's more, you may use another special character * if necessary, which means during each operations, you may change the alphabet characters to *, or change each * to a specific character.
We want to know the minimum operation times. If impossible, return -1.
Template int MinOpTimes(string str1, string str2) { //... };
Examples Example 1: str1: accs, str2: eeec operation 1: change 'a'->'e'; // str1: eccs operation 2: change 'c'->'e'; // str1: eees operation 3: change 's'->'c'; // str1: eeec return 3;
Example 2: str1: accs, str2: efec return -1;
Example 3: str1: abb, str2: baa operation 1: change 'a'->'*'; // str1: *bb operation 2: change 'b'->'a'; // str1: aa operation 3: change ''->'b'; // str1: baa return 3;
The following metrics were computed from 1 interview experience for the TuSimple Software Development Engineer General role in United States.
TuSimple's interview process for their Software Development Engineer General roles in the United States is incredibly easy as the vast majority of engineers get an offer after going through it.
Candidates reported having very good feelings for TuSimple's Software Development Engineer General interview process in United States.