Given a Stack consisting of N elements, the task is to reverse the Stack using an extra stack. Examples: Input: stack = {1, 2, 3,… Read More

# Tag Archives: Reverse

Given a string S consisting of N lowercase characters, the task is to find the starting and the ending indices ( 0-based indexing ) of… Read More

Given a string S consisting of N characters and positive integer K, the task is to check if there exist any (K + 1) strings… Read More

Given a string S representing a sentence, the task is to reverse the order of all palindromic words present in the sentence. Examples: Input: S… Read More

Given an integer N, the task is to find the absolute difference between the number of set bits present in the number N and in… Read More

Given three positive integers L, R, and K, the task is to find the largest group of palindromic numbers from the range [L, R] such… Read More

Given a XOR Linked List and a positive integer K, the task is to reverse the last K nodes in the given XOR linked list.… Read More

Given an array Q[][] consisting of N queries of the form {L, R}, the task for each query is to find the total count of… Read More

Given a binary tree consisting of N nodes, the task is to check if the nodes in the top view of a Binary Tree forms… Read More

Given a string S of length N, the task is to find the lexicographically smallest K-length subsequence from the string S (where K < N). … Read More

Given an array arr[] consisting of N positive integers, the task is to find the count of unique pairs (i, j) such that the sum… Read More

Given an array arr[] of size N, the task is to find the lexicographically largest permutation array by reversing any suffix subarrays from the array.… Read More

Given a Binary Tree with each node representing an alphabet, the task is to find lexicographically smallest palindromic root to leaf path. If no palindromic… Read More

Given an array arr[] of size N and a positive integer K, the task is to find the maximum prefix sum after K reversals of… Read More