Round 1
Questions: Hey y’all! I got another solution for Leetcode 791 Custom Sort String as well as a variant and a follow-up question.
From what I’ve seen, Meta almost asks the original Leetcode problem. For the variant, they sometimes just give you a List
instead of a string
for the order
parameter. So…nothing really changes in the code.
If you manage to solve the problem and have time leftover (which, great signal), there is a follow-up question: what if you had to optimize your solution from a HashMap<Character, Integer>
to a List<Integer>
?
Check it out (or not!): Leetcode 791 Custom Sort String
The GitHub link to all the code solutions: https://github.com/CodingWithMinmer/CodingWithMinmer
Reference to the OG LC problem: https://leetcode.com/problems/custom-sort-string/description/
Good luck on your phone screens & onsite loops.
Candidate's Approach
No approach provided.
Interviewer's Feedback
No feedback provided.