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 06dabed

Browse files
committed
string operations
1 parent 0f6fe90 commit 06dabed

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎49_group_anagrams.scala‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
object Solution {
2+
def groupAnagrams(strs: Array[String]): List[List[String]] = {
3+
strs.toList.groupBy(_.toSeq.sorted).values.toList
4+
}
5+
}

0 commit comments

Comments
(0)

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