Create a function that takes a string and returns the number (count) of vowels contained within it.
Input:-hello world
Input Description: Input: String
Output: 3
Output Description: Number of vowels.
Constraints: 1 <= string length <= 1000
Explanation:
EASY
longest_palindrome_in_a_string
Longest Palindrome in a String
Given a string S, find the longest palindromic substring in S.
Substring of string S: S[ i . . . . j ] where 0 ≤ i ≤ j < len(S).
Palindrome string: A string which reads the same backwards. More formally, S is palindrome if reverse(S) = S.
Incase of conflict, return the substring which occurs first ( with the least starting index).
for example string is "aaaabbaa" The longest Palindromic
substring is "aabbaa".
Input:-aaaabbaa
Input Description: The first and only line of input contains the String
Output: aabbaa
Output Description: return the longest palindromic substring.
Constraints: 1 <=S <=103
Explanation: null
HARD
display_hello_world_multiple_times
Display Hello World Multiple Times
Display Hello World n times.
Input:-4
Input Description: take n as input and return that no of "Hello World"
Output: Hello World displayed 5 times
Output Description: Hello World displayed 5 times.
Constraints: 1 <= number <= 1000
Explanation:
MEDIUM
sum_all_arguments
Sum All Arguments
Write a function "sumAll" that takes an arbitrary number of arguments and returns their sum using the rest operator.
Input:-1, 2, 3, 4
Input Description: Input: Arbitrary number of arguments
Output: 10
Output Description: Sum of all arguments.
Constraints: 1 <= number of arguments <= 1000
Explanation:
MEDIUM
uppercase_input
Uppercase Input
When the user types in an input field, automatically convert the text to uppercase.
Input:-hello
Input Description: Input: String
Output: HELLO
Output Description: Uppercase string.
Constraints: 1 <= string length <= 1000
Explanation:
EASY
find_frequency_of_character_pairs
Find Frequency of Character Pairs
Write a function that returns the frequency of character pairs (two consecutive characters) in a string.
Input:-ababa
Input Description: Input a single string.
Output: ab:2 ba:2
Output Description: Output the frequency of character pairs in the format "pair:count".
Constraints: 1 <= string length <= 10^6
Explanation:
EASY
count_words_with_repeating_characters
Count Words with Repeating Characters
Write a function that counts the number of words in a sentence that have repeating characters.
Input:-hello world
Input Description: Input a string.
Output: 1
Output Description: Output the count of words with repeating characters.
Constraints: 1 <= string length <= 10^6
Explanation:
EASY
convert_snake_case_to_camel_case
Convert Snake Case to Camel Case
Write a function to convert a string from snake_case to camelCase.
Input:-hello_world
Input Description: Input a snake_case string.
Output: helloWorld
Output Description: Output the camelCase string.
Constraints: 1 <= string length <= 10^6
Explanation:
EASY
remove-vowels
Remove Vowels from String
Implement a function to remove all vowels from a given string. Vowels are characters 'a', 'e', 'i', 'o', 'u' and their uppercase equivalents 'A', 'E', 'I', 'O', 'U'. The function should return the modified string with all vowels removed.
EASY
chop-string
Chop String into Chunks
Write a code to chop a string into chunks of a given length and return it as an array.
MEDIUM
check-search-text
Check if Search Text is in Name
Write a function to check if a given search text is present either at the beginning of the first name or the second name.
MEDIUM
list-elements-digits
List Elements with Digits
Write a function which returns a list of elements that contain at least one character as a digit.
MEDIUM
truncate-letters
Truncate String by Letters
Write a function to truncate a string to a certain number of letters.
EASY
count-between-x
Count Characters between First and Last 'X'
Write a function that returns the count of characters between the first and last 'X' in a string.
MEDIUM
replace-spaces
Replace Spaces with Underscores
Write a code to replace all the spaces in a string with underscores.
EASY
reverse-string-words
Reverse String by Words
Write a program to reverse a string by words and show the reverse of each word in place.
MEDIUM
reverse-string
Reverse a String
Write a program to reverse a string using different approaches.
MEDIUM
reverse-integer
Reverse Integer
Given a 32-bit signed integer, reverse it and return the reversed number. If the reversed number overflows, return 0.
EASY
longest-common-subsequence
Longest Common Subsequence
Given two strings, find the length of their longest common subsequence (LCS). A subsequence is a sequence that appears in the same relative order, but not necessarily contiguous. For example, 'abc' is a subsequence of 'aabbcc.'