Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 153b5fc

Browse files
more code
1 parent 1cbc3b5 commit 153b5fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/main/scala/org/codecraftlabs/leetcode/ContainsDuplicate.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ object ContainsDuplicate {
66
numbers match {
77
case None => false
88
case _ => val items = numbers.get
9-
if (items.isEmpty) false else items.groupBy(identity).mapValues(_.length).exists(item => item._2 > 1)
9+
if (items.isEmpty) false else items.groupBy(identity).view.mapValues(_.length).exists(item => item._2 > 1)
1010
}
1111
}
1212
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /