Skip to content

Tag Archives: Reverse

Given a string S of length N and an integer P denoting a pointer to Pth index of the string, the task is to find… Read More
Given an integer N, the task is to find the smallest number to be subtracted from N to obtain a palindrome. Examples: Input: N =… Read More
Given an array of strings S[] consisting of N distinct strings of length M. The task is to generate the longest possible palindromic string by… Read More
Given an array arr[] consisting of N integers and an integer X, the task is to print the array after performing X queries denoted by… Read More
Given string str, the task is to check if it is possible to split the given string S into three palindromic substrings or not. If… Read More
Given an array arr[], the task is to print the array obtained by inserting elements of arr[] one by one into an initially empty array,… Read More
Given an array arr[] consisting of N positive integers, the task is to find the sum of all array elements after reversing digits of every… Read More
Given two sorted arrays A[] and B[] consisting of N distinct integers, the task is to rearrange the elements of array B[] such that, for… Read More
Given an integer N, the task is to check if it is a solution to the equation 2 * reverse(N) – 1 = N Examples:… Read More
Given string str consisting of lowercase alphabets, the task is to construct the lexicographically smallest non-palindromic string by swapping any pair of adjacent characters from… Read More
Given an integer N, the task is to check if    (N in base B) is palindrome or not.   Examples:    Input: N =… Read More
Given an array arr[] of size N, the task is to print the count of non-palindromic numbers present in the given array whose first and… Read More
Given string str, the task is to reverse the string by considering each word of the string, str as a single unit. Examples: Input: str… Read More
Given a string str and a positive integer N, the task is to reverse N characters and skip N characters until the end of the… Read More
Given two arrays A[] and B[], the task is to check if array B can be made equal to A by reversing the subarrays of… Read More

Start Your Coding Journey Now!