Sorry how is Case 1 a total of 3 ? Original AAABBB You are missing 2 types lowercase and a digit. So add a lower case and a digit to break up the substrings Edited AAcABB1B That's is a total of 2 changes ?
Good question and apologies for the confusion. Case 1 lists 3 conditions we need to address in the ENTIRE string. AAABBB is just a *subset* of that string that I wrote out to illustrate how we address insertions / digits / triplets at the same time. Now that I think about it, it’s actually impossible that a string needs 3 inserts and has 2 triplets at the same time because if it needs 3 inserts, its total length should be 3. That’s probably why this was confusing to you. Apologies once again for the flawed setup; the main conclusion is still correct though and is the main takeaway. However many edits are required to address all of (missing types / triplets / inserts) is going to be max(num missing types, num triplets, num inserts). If it helps, you can imagine the problem description instead said the minimum length is 16 instead of 6 and revisit the 3 cases I listed-it’ll lead you to the same conclusion.
@@TechTalk438 Thanks for the reply it was very late at night when I sent that message. I understand now and I was able to tackle it today it wasnt the cleanest solution but I am happy that I was able to take on the challenge :D Yeah it threw me off when you only showed the two subsets I thought that was the entire string
Most clear walkthrough (and done in the least amount of time) on strongest password checker i've seen. Thank you.
Best teacher/lecturer I've had at Cal. Speaks volumes
I have come to this intuition by myself but i couldn't handle the case where length is greater than 20
Very helpful thank you
Sorry how is Case 1 a total of 3 ?
Original AAABBB
You are missing 2 types lowercase and a digit.
So add a lower case and a digit to break up the substrings
Edited AAcABB1B
That's is a total of 2 changes ?
Good question and apologies for the confusion. Case 1 lists 3 conditions we need to address in the ENTIRE string. AAABBB is just a *subset* of that string that I wrote out to illustrate how we address insertions / digits / triplets at the same time.
Now that I think about it, it’s actually impossible that a string needs 3 inserts and has 2 triplets at the same time because if it needs 3 inserts, its total length should be 3. That’s probably why this was confusing to you.
Apologies once again for the flawed setup; the main conclusion is still correct though and is the main takeaway. However many edits are required to address all of (missing types / triplets / inserts) is going to be max(num missing types, num triplets, num inserts). If it helps, you can imagine the problem description instead said the minimum length is 16 instead of 6 and revisit the 3 cases I listed-it’ll lead you to the same conclusion.
@@TechTalk438 Thanks for the reply it was very late at night when I sent that message. I understand now and I was able to tackle it today it wasnt the cleanest solution but I am happy that I was able to take on the challenge :D
Yeah it threw me off when you only showed the two subsets I thought that was the entire string