Skip to content

Tag Archives: strings

Given a string str and a positive integer k, the task is to write a Java program to print the first k characters of the… Read More
Given string str, the task is to print the middle character of a string. If the length of the string is even, then there would… Read More
Given string str, the task is to write a Java program to swap the first and the last character of the given string and print… Read More
Given string str, the task is to write Java Program to remove the first and the last character of the string and print the modified… Read More
Given a string in Snake Case, the task is to write a Java program to convert the given string from snake case to camel case… Read More
Given a date in the form of a string, the task is to write a Java Program to get the day, month, and year from… Read More
Given a string, the task is to write a Java program to check whether the string contains only alphabets or not. If so, then print… Read More
Given a string S of size N, the task is to count the occurrences of all the prefixes of the given string S. Examples:   Input:… Read More
Given two integers N and K, the task is to find the number of binary strings of length N having an even number of 1’s… Read More
Given a string str and an integer K, the task is to find the length of the longest sub-string S such that every character in… Read More
Given two strings S1 and S2 of length N and a positive integer K, the task is to find the lexicographically smallest string such that… Read More
A Dart string is a sequence of UTF-16 code units. With the same rule as that of Python you can use either single or double… Read More
In this article, we will create our custom string class which will have the same functionality as the existing string class. The string class has… Read More