Count the total number of ways to complete N jobs (1 to N), each job having Ui units (1 <= i <= N) such that all jobs are completed sequentially (i.e Ji Read more →
Latest tutorials
505 postsGiven a matrix of N rows and N columns in square form. The matrix elements are numbers from 0 to 9, the task is to identify the largest square within the limits Read more →
Given an array of size N, find if we can choose any arbitrary X elements (X <= N) from this array that have an odd summation. Examples : Input : N = Read more →
Given an array of integer A[] having no duplicate elements, write a function that returns the count of all the permutations of array having no subarray of [i,i+1] for every i in Read more →
Given a natural number N our task is to find smallest number M having same length in binary representation as N such that difference between N | M (Bitwise-OR) and N ^ Read more →
Given a String s of length of N.Find the sum of unique characters of each sub string of the given string.Each String consists of n*(n+1)/2 sub strings. Examples : Input : n Read more →
Write a function which takes a string and prints the superior character(if it exists), otherwise prints “No Superior Character”. A superior character in a string ‘str’ of size n is an element Read more →
In machine learning, vectors and matrixes are used extensively to represent features, targets and other parameters and hyperparameters. Calculating the length or magnitude of the vector used in a particular model is Read more →
The program must accept a string value S contains only alphabets as the input. The program must print an alphabet from S which has occurred first in the alphabetical order as the Read more →
Minimum number of steps to make string a good string : Given a string with characters a and b.A string is called good if it doesnot contain substring “ab”.If we have substring Read more →