Strong Password Checker (HARD) - Solve with Sam in Python

Published 2024-05-02
Today's live solve programming question is viewer requested! Leetcode 420, and if you'd like more of this type of content please like and subscribe!
I cut out empty spaces and added chapters to make it easier to jump around.
Follow along as I attempt this leetcode hard question live! I explain my thought process and how I would communicate to a tech interviewer.

00:00 - Intro
00:54 - Problem Overview
02:36 - Levenshtein distance
03:34 - Discuss approaches
07:20 - Wildcard concept
08:54 - Remove/edit pattern
10:07 - Start pseudo-code
11:22 - Start solve
12:32 - Sequences structure
14:01 - Combining counts
14:15 - Count unique
16:40 - Sequence edit ratio
18:33 - Sequence remove logic
20:53 - Making sequences
22:06 - Sequence sorting O(NKlogK)
24:00 - Discuss scoring sequence
24:44 - Discuss modular code
25:27 - Start scoring sequence
27:07 - Examples before submit
29:01 - First test on leetcode
29:40 - First submit on leetcode
30:23 - Second submit
30:23 - Discuss optimizations
31:31 - Min-Heap vs Sorting
34:37 - Submit on leetcode
35:12 - Discussion of logic/strategy
36:00 - Other approaches
36:25 - Big O discussion
38:04 - Looking at other solutions

Question: leetcode.com/problems/strong-password-checker/

All Comments (6)
  • @3ombieautopilot
    Thank you. I’ll put this problem for later and compare my solution with yours. This one seems a bit too hard for me right now 😅
  • @tinle6487
    Can you make a video on the tutorial on the shortcut and how you move everything around so fast? I know how they work but the way you did it is so magical
  • @tinle6487
    Finally hahaaa. Thank you thank you