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

Appearance settings

Commit 3f7cbdf

Browse filesBrowse files
committed
add scala solution for Jewels-and-Stones
1 parent f14caa0 commit 3f7cbdf
Copy full SHA for 3f7cbdf

File tree

2 files changed

+7
-0
lines changed
Filter options

2 files changed

+7
-0
lines changed

‎.gitignore

Copy file name to clipboardExpand all lines: .gitignore
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
.DS_Store
33
.AppleDouble
44
.LSOverride
5+
.idea
56

67
# Icon must end with two \r
78
Icon
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/**
2+
* scala solution, not sure the fastest but surely the simplest
3+
*/
4+
object Solution {
5+
def numJewelsInStones(J: String, S: String): Int = S.toSeq.count(J.contains(_))
6+
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.