Practice Generate Tag for Video Caption
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
Given caption, first combine its words into a camelCase string prefixed with #. Lowercase the first word; capitalize the first letter of each later word and lowercase its remaining letters. Next remove every character that is not an English letter except the initial #. Finally truncate the complete result to at most 100 characters. Return the tag.
Source: Generate Tag for Video Caption on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
caption = "Leetcode daily streak achieved"
"#leetcodeDailyStreakAchieved"
# Example 2
caption = "can I Go There"
"#canIGoThere"
# Example 3
caption = "hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh"
"#hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh"
Constraints
Related LeetCode Problems
Practice more problems similar to Generate Tag for Video Caption.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.