Given an array of integers ‘arr’, the task is to find the bitwise XOR of all the prime numbers present in the array. Examples : Input : arr[] = {2, 5, 8, Read more →
Latest tutorials
505 postsGiven Nth integer and you have to find the sum of first Nth integers whose digit sum is divisible by 10. Examples : Input : 2 Output : 47 Input : 11 Read more →
Given an array of n numbers, your task is to keep at most k elements at the top according to their frequency. When the stream has k or more distinct elements, print Read more →
Sometimes, while working with Python dictionaries, we can have a problem in which we need to flatten the dictionary of key-value pairs pairing the equal index elements together. This can have utilities Read more →
Given an unweighted tree of N nodes , find out the largest distance between any two of its nodes , where distance between two nodes means the number of different edges in Read more →
Given an array of random non-negative numbers find the longest strictly increasing subsequence. You might have seen this solved with Dynamic Programming which has O(n^2) complexity, and another one which has O(n Read more →
Given a number N, the task is to find Nth Icosachiliagon number. A Icosachiliagon number is class of figurate number. It has 20000 – sided polygon called Icosachiliagon. The N-th Icosachiliagon number Read more →
Given two numbers N and K, the task is to check if N is a K-Persistent Number or not. If N is a K-Persistent Number then print “Yes” else print “No”. A Read more →
Given a singly linked list of n nodes and find the sum and product of smallest and largest elements in linked list. Examples : Input : 15 14 13 22 17 Output Read more →
Given two numbers n and m, where n and m can be as large as 10^9 and n>=m. Find the last digit that will be in the value of n! / m!. Read more →