Reverse only the alphabets in a string

Given a string that has alphabets and special characters. Write code that reverse only the alphabets in the string and does not change the special […]

Reverse a string

Write a simple code to reverse a string. INPUT: "HELLO WORLD" OUTPUT: "DLROW OLLEH"

String Matching Algorithms

Given a string of characters, search for a pattern (another smaller string) in the string. For example, if given string is Ritambhara Technologies for Coding […]

Remove all white spaces from a string

Given a string that may have white spaces, write code to remove all white spaces from than string. For example: Input String: "IT IS HOT […]

Check duplicate parenthesis in an expression

A valid mathematical expression can also have duplicate parenthesis as shown below: ((a+b)) (((a+(b)))+(c+d)) Write code to find if an expression has duplicate parenthesis. You […]

Compare to strings given as linked list

In C language, string library has a function strcmp that takes two arguments and return -1, 0 or 1 depending on whether first string is […]

Print characters coming in one of the 2 strings (and not in both)

Given two strings, write a function which will print characters coming on only one of the two strings (and not both). The character may be […]

Print first non-repeating character in the string

Given a String where characters are repeating. Write code to print the first character that is repeating later in the string. e.g, Input String: ritambhara […]

Print character occurring maximum number of times in a string

Write a function which will print the character coming maximum number of times in a given String. For example: Input String: ritambhara Output: a Because […]

Longest substring of unique characters

Given a String in which characters may be repeating. Find the length of longest substring of where all characters are unique (non-repeating). For Example: If […]