Given an integer array arr[] (0 < arr[i] < 106) of size N, the task is to find the LCM of unique elements of the array. If there is no unique element Read more →
Latest tutorials
505 postsA stream in Node is simply a sequence of bytes. A stream contains a buffer of bytes, and this buffer has a zero or greater length. In Node, streams are objects representing Read more →
We have a set of numbers from 1 to N. In one operation we are allowed to replace A and B by rounded up value of (A+B)/2. We can perform this procedure Read more →
Given an array of positive integers you can reshuffle the array and construct a new array on which we can perform operation X on it the elements we receive must be in Read more →
The File library of java provides many methods for creating new directories, listing the contents of a directory, path name, deleting or renaming files and modes in which file can be opened Read more →
Generate an array A, such that gcd of all its contiguous subarray is present in the given array G. If it is not possible to generate such an array then print -1. Read more →
We can define a database link to be a connection between 2 databases or two or more physical databases. Database links plays an significant role in case of distributed databases. Link is Read more →
Given a Complete Binary Tree, the task is to print the elements in the Clockwise Triangular traversal order. Examples : Input : 1 / \ 2 3 / \ / \ 4 Read more →
Delete an element from the Set by passing its value : Approach : In this method, an element is deleted by using the erase function and calling it with the value of Read more →
Given N coins initially all tails up (let say represented by ‘0’) and a number of queries Q. There are two types of queries. Update: 1) Given indices of a range [L, Read more →