We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1cbc3b5 commit 153b5fcCopy full SHA for 153b5fc
src/main/scala/org/codecraftlabs/leetcode/ContainsDuplicate.scala
@@ -6,7 +6,7 @@ object ContainsDuplicate {
6
numbers match {
7
case None => false
8
case _ => val items = numbers.get
9
- if (items.isEmpty) false else items.groupBy(identity).mapValues(_.length).exists(item => item._2 > 1)
+ if (items.isEmpty) false else items.groupBy(identity).view.mapValues(_.length).exists(item => item._2 > 1)
10
}
11
12
0 commit comments