@StefanPochmann This solution is so simple and elegant. One of my favorites that I've seen. Just had to compliment you on it!
So simple yet non-obvious (at least to me). So impressed with this.
@StefanPochmann This solution is so simple and elegant. One of my favorites that I've seen. Just had to compliment you on it!
So simple yet non-obvious (at least to me). So impressed with this.
@sha256pki O(n^(k-1))
(careful with parentheses) but yes