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 →
Numbers
10 postsWe 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 N and M, distribute first N natural numbers in two sets such that the absolute sum of the numbers in the two sets is equal to M. If possible, print the Read more →
Given a number num (0 < num < 108), the task is to sort the digits of the number such that even indices are in ascending order and odd indices in descending Read more →
Given an Integer Stack in Java, sort the stack in increasing order (Ascending Order) Examples: Input : Stack: [10, 2, 16, 5, 9, 1] Peek: 1 Output : Stack: [1, 2, 5, Read more →
Given an infinite stream of integers, find the k’th largest element at any point of time. It may be assumed that 1 <= k <= n. Example: Input: stream[] = {10, 20, Read more →
Given an array arr[] of N non-negative integers, the task is to sort these integers according to the sum of letters required to represent them. Examples: Input: arr[] = {12, 10, 31, Read more →
Given an array arr[ ] of N non-negative integers, the task is to sort these integers according to sum of their digits. Examples : Input : 12 10 102 31 15 Output Read more →
Given an array of size N. The task is to find the maximum and the minimum element of the array using the minimum number of comparisons. Examples: Input : A[]={4,2,-1,5,0,-5,7,3,6} Output : Read more →
In this article, you will learn to find the roots of a quadratic equation in C programming. Quadratic Equation : In elementary algebra a quadratic equation is an equation in the form Read more →