Skip to content

Commit 734cb40

Browse files
refactor 1461
1 parent 8b7d3b4 commit 734cb40

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/com/fishercoder/solutions/_1461.java

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55

66
public class _1461 {
77
public static class Solution1 {
8+
/**
9+
* inspired by https://leetcode.com/problems/check-if-a-string-contains-all-binary-codes-of-size-k/discuss/660505/Java-4-lines-solution
10+
*/
811
public boolean hasAllCodes(String s, int k) {
912
Set<String> set = new HashSet<>();
1013
for (int i = 0; i <= s.length() - k; i++) {

0 commit comments

Comments
 (0)