There are n pencils, each having l length. Each can write 4 kilometers. After writing 4 kilometers it has l/4 length. One can join 4 pencils which are having l/4 length and Read more →
The urlSearchParams.append() is an inbuilt application programming interface of class URLSearchParams with in url module which is used to append the associate argument of name to value in this url search params Read more →
Given a number X, and an array of length N containing the N numbers. Find the minimum number of operations required to make X non-positive. In one operation, you can select any Read more →
Given a ‘N*N’ 2d matrix consisting of positive integers, the task is to find the probability of collecting maximum points by moving either up(from {i,j} to {i+1,j}) or right (from {i,j} to Read more →
Imagine a rooted tree ( with root as node 1). Every node is given two values, init value and expected value. Our task is to flip the node value to make the Read more →
Given a number N which is a power of 2. Calculate total number of set bits from 1 to N-1. Examples : Input : N = 8 Output : 12 Explanation : Read more →
The Math.truncate() function used to return the rounded value of the specified double and float value. Syntax: fun truncate(x : DataType): DataType Parameters: It can take data two data type such as Read more →
An important aspect of competitive coding is analyzing the algorithms because in competitive coding apart from correctness, efficiency of algorithms also matters significantly. One the most important aspect of time complexity analysis Read more →
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 →
Introduction : Before 21st century there were three basic requirements of humans they were food, clothing and shelter. But now in this 21st century there is an additional fourth requirement along with Read more →