## Sum of fifth powers of the first n natural numbers

Write a program to find the sum of Fifth powers of the first n natural numbers 15 + 25+ 35 + 45+ …….+ n5 till… Read More »

Write a program to find the sum of Fifth powers of the first n natural numbers 15 + 25+ 35 + 45+ …….+ n5 till… Read More »

Given two fractions a/b and c/d, compare them and print the larger of the two. Examples : Input: 5/6, 11/45 Output: 5/6 Input: 4/5 and… Read More »

Given a non-negative integer n. The problem is to reverse the bits of n and print the number obtained after reversing the bits. Note that… Read More »

Given an array arr[] and an integer k, we need to print k maximum elements of given array. The elements should printed in the order… Read More »

Given a 2D array(m x n), check if there is any path from top left to bottom right. In the matrix, -1 is considered as… Read More »

Odious number is a nonnegative number that has an odd number of 1s in its binary expansion. The first few odious numbers are therefore 1,… Read More »

Given an integer, set the leftmost unset bit. Leftmost unset bit is the first unset bit after most significant set bit. If all bits (after… Read More »

A race is going on in which several stones are placed on a road. A bucket is placed at the starting point of the race… Read More »

Addition or Subtraction of matrices takes O(n^2) time without threads but using threads we doesn’t reduce the time complexity of the program we divide the… Read More »

A pernicious number is a positive integer which has prime number of ones in its binary representation. The first pernicious number is 3 since 3… Read More »

Diagonal matrix: A square matrix is said to be diagonal matrix if the elements of matrix except main diagonal are zero. A square null matrix… Read More »

Given a number n, find sum of square of first n odd natural numbers. Examples: Input : 3 Output : 35 12 + 32 +… Read More »

Given a number n, find sum of square of first n even natural numbers. Examples: Input : 3 Output : 56 22 + 42 +… Read More »

Find the smallest number such that the sum of its digits is N and it is divisible by . Examples: Input : N = 5… Read More »

Given an array of n integers, find the sum of f(a[i], a[j]) of all pairs (i, j) such that (1 <= i < j <=… Read More »