Skip to content

Commit

Permalink
Discrete log comment
Browse files Browse the repository at this point in the history
  • Loading branch information
hildjj committed Dec 25, 2020
1 parent 7e096f7 commit d747cfa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions day25.js
Expand Up @@ -14,6 +14,9 @@ function transform(val, loopSize) {
return cur
}

// This is naive discrete log approach. If it needs to be faster, there
// are some links to algorithms here:
// https://en.wikipedia.org/wiki/Discrete_logarithm
function findKey(target, subject) {
let val = 1
let i = 1
Expand Down

0 comments on commit d747cfa

Please sign in to comment.