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 →
Latest tutorials
505 postsImagine 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 →
The parameters of the function call are known as actual parameters and the parameters of the function definition are known as formal parameters. There are 3 ways of passing parameters in a Read more →
Given 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 →