# Tag Archives: Reverse

Given an array arr[] of size N and a value K, the task is to print the array rotated by K times to the right.… Read More
Given an array arr[] containing N integers, the task is to find the maximum sum obtained by adding the elements at the same index of… Read More
Example: Let the input string be “i like this program very much”. The function should change the string to “much very program this like i”… Read More
Example: Let the input string be “i like this program very much”. The function should change the string to “much very program this like i”… Read More
Example: Let the input string be “i like this program very much”. The function should change the string to “much very program this like i”… Read More
Example: Let the input string be “i like this program very much”. The function should change the string to “much very program this like i”… Read More
Example: Let the input string be “i like this program very much”. The function should change the string to “much very program this like i”… Read More
Example: Let the input string be “i like this program very much”. The function should change the string to “much very program this like i”… Read More
Given two linked lists sorted in increasing order. Merge them such a way that the result list is in decreasing order (reverse order). Examples:  Input:… Read More
Given two linked lists sorted in increasing order. Merge them such a way that the result list is in decreasing order (reverse order). Examples:  Input:… Read More
Given two linked lists sorted in increasing order. Merge them such a way that the result list is in decreasing order (reverse order). Examples:  Input:… Read More
Given two linked lists sorted in increasing order. Merge them such a way that the result list is in decreasing order (reverse order). Examples:  Input:… Read More
Given a string s. The task is to minimize the number of adjacent swaps required to reverse the string.  Examples: Input: s = “abc”Output: 3Explanation:… Read More
Given a linked list, write a function to reverse every alternate k nodes (where k is an input to the function) in an efficient way.… Read More
Given a linked list, write a function to reverse every k node (where k is an input to the function). Examples:   Inputs:  1->2->3->4->5->6->7->8->NULL, k =… Read More