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

## Sort an array where a subarray of a sorted array is in reverse order

Given an array of N numbers where a subarray is sorted in descending order and rest of the numbers in the array are in ascending… Read More »

## Minimum inverting factor in an array

Given an array of n positive integers, the task is to find the minimum inverting factor in the given array. Inverting factor is defined as… Read More »

## Reverse a Linked List according to its Size

Given a linked list with n nodes, reverse it in the following way : If n is even, reverse it in group of n/2 nodes.… Read More »

## Reverse String according to the number of words

Given a string containing a number of words. If the count of words in string is even then reverse its even position’s words else reverse… Read More »

## Print reverse string after removing vowels

Given a string s, print reverse of string and remove the characters from the reversed string where there are vowels in the original string. Examples:… Read More »

## Sorting array with reverse around middle

Consider the given array arr[], we need to find if we can sort array with the given operation. The operation is 1. We have to… Read More »

## Program to print Reverse Floyd’s triangle

Floyd’s triangle is a triangle with first natural numbers. Task is to print reverse of Floyd’s triangle. Examples: Input : 4 Output : 10 9… Read More »

## Longest common suffix of two linked lists

Given two singly linked lists, find the Longest common suffix of two linked lists. If there are no common characters which are suffixes, return the… Read More »

## C Program to reverse each node value in Singly Linked List

A linked list is a linear collection of data elements, in which each node points to the next node. Unlike an array, it doesn’t have… Read More »

## Reverse tree path

Given a tree and a node data, your task to reverse the path till that particular Node. Examples: Input : 7 / \ 6 5… Read More »