Reverse Middle X Characters

Given a string str and an integer X. The task is to reverse the middle X characters of the given string and then print the… Read More »

Program to copy the contents of one array into another in the reverse order

Given an array, the task is to copy these array elements into another array in reverse array. Examples: Input: array: 1 2 3 4 5… Read More »

Add index to characters and reverse the string

Given a string str, the task is to encrypt and reverse the string. The string is encrypted by adding every character of the string with… Read More »

Substring Reverse Pattern

Given a string str, the task is to print the pattern given in the examples below: Examples: Input: str = “geeks” Output: geeks *kee* **e**… Read More »

C Program to Reverse Array of Strings

Given an array of string literals, reverse the array. Examples: Input : arr[] = {“Coding”, “Never”, “Fail”, “Me”} Output : arr[] = {“Me”, “Fail”, “Never”,… Read More »

Reverse middle words of a string

Given a string str, print reverse all words except the first and last words. Examples: Input : Hi how are you geeks Output : Hi… Read More »

Program to find first N Iccanobif Numbers

Given a number N. The task is to find first N Iccanobif Numbers. Iccanobif Numbers are similar to Fibonacci Numbers. The K-th Iccanobif number can… Read More »

Find a palindromic string B such that given String A is a subsequense of B

Given a string . Find a string , where B is a palindrome and A is a subsequence of B. A subsequence of a string… Read More »

Clone a stack without extra space

Given a source stack, copy the contents of the source stack to destination stack maintaining the same order without using extra space. Examples: Input :… Read More »

StringBuilder reverse() in Java with Examples

The reverse() method of StringBuilder is used to reverse the characters in the StringBuilder. The method helps to this character sequence to be replaced by… Read More »

Print Doubly Linked list in Reverse Order

Given a doubly-linked list of positive integers. The task is to print the given doubly linked list data in reverse order. Examples: Input: List =… Read More »

strrev() function in C

The strrev() function is a built-in function in C and is defined in string.h header file. The strrev() function is used to reverse the given… Read More »

Recursively Reversing a linked list (A simple implementation)

Given pointer to the head node of a linked list, the task is to recursively reverse the linked list. We need to reverse the list… Read More »

Perl | Reverse an array

Reverse an array or string in Perl. Iterative Way: Iterate over the array from 0 to mid of array. Swap the arr[i] element with arr[size-i]… Read More »

Reverse a doubly circular linked list

The problem is to reverse the given doubly circular linked list. Examples: Input: Output: Recommended: Please try your approach on {IDE} first, before moving on… Read More »