# Tag Archives: Reverse

## 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 »

## Sort first k values in ascending order and remaining n-k values in descending order

Given an array of size n, arrange the first k elements of the array in ascending order and the remaining n-k elements in descending order.… Read More »

## Split the array and add the first part to the end | Set 2

Given an array and split it from a specified position, and move the first part of array add to the end. Examples: Input : arr[]… Read More »

## Reverse a LinkedList in Java

Assuming you have gone through LinkedList in java and know about linked list. This post contains different examples for reversing a linked list which are… Read More »

## Reverse an ArrayList in Java

Assuming you have gone through arraylist in java and know about arraylist. This post contains different examples for reversing an arraylist which are given below:… Read More »

## Merge first half and reversed second half of the linked list alternatively

Given a linked list, the task is to rearrange the linked list in the following manner: Reverse the second half of given linked list. Rearrange… Read More »