## Program to build DFA that starts and end with ‘a’ from input (a, b)

DFA (Deterministic Finite Automaton or Acceptor) is a finite state machine that accepts or rejects strings of symbols. DFA accepts the string if it reaches… Read More »

DFA (Deterministic Finite Automaton or Acceptor) is a finite state machine that accepts or rejects strings of symbols. DFA accepts the string if it reaches… Read More »

Given a string str. Check if it is possible to convert the string into palindrome string by changing only one character. Examples: Input : str… Read More »

Given a matrix of characters containing only lowercase letters, form a new string from the matrix that remain after removing the duplicate characters from each… Read More »

Given a string s and Q number of queries. Each query Q consists of l and r and a character c. Find frequency of character… Read More »

Given two strings s1 and s2(call letters in uppercase). Check if it is possible to convert s1 to s2 by performing following operations. 1. Make… Read More »

Given two strings, find the length of longest uncommon subsequence of the two strings. The longest uncommon subsequence is defined as the longest subsequence of… Read More »

Given two strings a and b, form a new string of length l, from these strings by combining the prefix of string a and suffix… Read More »

Given a numeric string (length <= 32), split it into two or more integers( if possible), such that 1) Difference between current and previous number… Read More »

Given a binary string of 0s and 1s. The task is to find the length of substring which is having a maximum difference of number… Read More »

Given a string, find concatenation of all substrings in lexicographic order. Examples: Input : s = “abc” Output : aababcbbcc The substrings of s in… Read More »

Given a sentence, task is to rewrite in Google Case. It is a style of writing where we replace all lower case letters into upper… Read More »

Given a string s, change the string s according to the rules provided below: Delete all the vowels from the string. Insert # in front… Read More »

Given a string find its first uppercase letter Examples : Input : geeksforgeeKs Output : K Input : geekS Output : S Recommended: Please try… Read More »

Given a string, count how many maximum-length palindromes are present.(It need not be a substring) Examples: Input : str = “ababa” Output: 2 Explanation :… Read More »

Given a string s that may have duplicate characters. Find out the lexicographic rank of s. s may consist lower as well as upper case… Read More »