File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -22,5 +22,9 @@ For example:
2222
2323Given Santa's current password (your puzzle input), what should his ** next password** be?
2424
25+ ## Part Two
26+
27+ Santa's password expired again. What's the next one?
28+
2529## References
2630- https://adventofcode.com/2015/day/11
Original file line number Diff line number Diff line change @@ -66,13 +66,13 @@ const skip = (password) => {
6666const passwordGenerator = ( password ) => {
6767 let nextPassword = password ;
6868
69- while ( ! isValidPassword ( nextPassword ) ) {
69+ do {
7070 if ( hasForbiddenCharacters ( nextPassword ) ) {
7171 nextPassword = skip ( nextPassword ) ;
7272 }
7373
7474 nextPassword = incrementPassword ( nextPassword ) ;
75- }
75+ } while ( ! isValidPassword ( nextPassword ) ) ;
7676
7777 return nextPassword ;
7878} ;
You can’t perform that action at this time.
0 commit comments