Leetcode contest
565 subscribers
176 photos
7 videos
2 files
59 links
Main channel @azamovme

Leetcode & Messages quotes from Estate developer
Download Telegram
Leetcode contest
Привет всем
السالم الايكم
new week new cooding 🌚
Make something with ..
Anonymous Poll
32%
JS
5%
Kotlin
9%
Dart
34%
Java
20%
Python
Today Contest
i will do
Goo ?
anyone have?
Please open Telegram to view this post
VIEW IN TELEGRAM
tomorrow contest
Hello Guys
Someone start contest ?
Dm : @saikou
Q1. Generate Tag for Video Caption
Mode :Easy
Example 1:

Input: caption = "Leetcode daily streak achieved"

Output: "#leetcodeDailyStreakAchieved"

Explanation:

The first letter for all words except "leetcode" should be capitalized
I will start contest with Kotlin 🗿 #contest #leetcode #leetcode7
Please open Telegram to view this post
VIEW IN TELEGRAM
Leetcode contest
Q1. Generate Tag for Video Caption Mode :Easy Example 1: Input: caption = "Leetcode daily streak achieved" Output: "#leetcodeDailyStreakAchieved" Explanation: The first letter for all words except "leetcode" should be capitalized
Status: Done
Code:Kotlin
IDLE : Intellij

Code :

class Solution {
fun generateTag(caption: String): String {

val words = caption
.split("\\s+".toRegex())
.map { it.filter(Char::isLetter) }
.filter(String::isNotEmpty)


val camel = words
.mapIndexed { idx, w ->
w.lowercase().let { low ->
if (idx == 0) low
else low.replaceFirstChar { it.uppercaseChar() }
}
}
.joinToString("")


return ("#$camel").take(100)
}
}


@leetcode7
#leetcodecontest #leetcode #contest
Please open Telegram to view this post
VIEW IN TELEGRAM