Given an integer array a[] of size N and a target sum K, subtract a number from each element such that each element becomes X ( if an element is less than Read more →
Programs
1 postGiven a number N, the task is to find Nth icosikaienneagonal number. An icosikaienneagonal number is class of figurate number. It has 29 – sided polygon called icosikaienneagon. The N-th icosikaienneagonal number Read more →
Leetcode Hard Problem, Simplest Solution Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays. The overall run time complexity should Read more →
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 →
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 →
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 →