Given a binary tree, the task is to print the nodes of the tree in an anti-clockwise spiral manner. Examples: Input: 1 / \ 2… Read More »

Given two strings A and B of equal lengths consisting of lower case English letters. The task is to count the minimum number of pre-processing… Read More »

Given three integers N, K and R. The task is to calculate the sum of all those numbers from 1 to N which yields remainder… Read More »

Given an array which represents y coordinates of a set of points on a coordinate plane, where (i, arr[i]) represent a single point. Find whether… Read More »

Given an array arr[] of N elements, the task is to find the length of the longest sub-sequence in arr[] such that all the elements… Read More »

Given three integers A, B and C, the task is to find the count of values of X such that the following condition is satisfied,… Read More »

Given two points (x1, y1) and (x2, y2) in 2-D coordinate system. The task is to count all the paths whose distance is equal to… Read More »

Given an integer N, the task is to find the number of trailing zeroes in the base 16 representation of the factorial of N. Examples:… Read More »

Given an array Arr[] of N integers. The task is to find minimum number of elements needed to be removed from the array, so that… Read More »

Given a Binary Tree, the task is to print the zigzag order of the tree. Examples: Input : 7 / \ 6 5 / /… Read More »

Given k sorted arrays of different length, merge them into a single array such that the merged array is also sorted. Examples: Input : {{3,… Read More »

bzmore command in Linux is used as a filter for CRT viewing of bzip2 compressed files, which are saved with .bz2 suffix. In simple words,… Read More »

Given a stack s, the task is to print the elements of the stack from bottom to top, such that the elements are still present… Read More »

Given a Binary tree, the task is to print all the internal nodes in a tree. An internal node is a node which carries at… Read More »

Given an array arr[], the task is to find the maximum length of a subsequence such that the adjacent elements in the subsequence have a… Read More »

Given two strings S1 and S2, you are allowed only to change a character at any position to any vowel if it is a vowel… Read More »

Given a Binary Tree, the task is to print the Reverse zigzag Order of the tree. Examples: Input: 1 / \ 2 3 / \… Read More »

Given the value of ‘N’ and ‘I’. Here, represents the number of internal nodes present in an N-ary tree and every node of the N-ary… Read More »

Given a linked list. The task is to reverse the order of the elements of the Linked List using an auxiliary Stack. Examples: Input :… Read More »

Given a singly linked list, write a function to swap elements pairwise. Input : 1->2->3->4->5->6->7 Output : 2->1->4->3->6->5->7, Input : 1->2->3->4->5->6 Output : 2->1->4->3->6->5 Recommended:… Read More »