We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cae3a09 commit d331a5bCopy full SHA for d331a5b
count_div.rb
@@ -0,0 +1,4 @@
1
+def solution(a)
2
+ return 0 if a.length != a.uniq.length
3
+ (1..a.length).inject(:+) == a.inject(:+)? 1 : 0
4
+end
0 commit comments