Solved


Counting Permutations
In the permutations of the numbers 1 to n, count the number of permutations in which exactly m elements are greater than the pre...

1 month ago

Solved


Determine flows of given probability using empirical frequency analysis
Write a function that takes as input observations of peak streamflow and exceedance probabilities expressed as percentages an...

1 month ago

Solved


Extract the prime numbers
Given a list of elements, extract the prime numbers from that array.

1 month ago

Solved


Find alternating sum
Given an array, find alternating sum i.e. – y = x (1) – x (2) + x (3) – x (4) + x (5) - …

1 month ago

Solved


Play with array Min-Max
An array is provided. For example, a= [ 2,1,11,4,5,13] Create an array from a like this way, out= [ 1,11,2,13,4,5] ➢ 1st take...

1 month ago

Solved


Given a matrix X, manipulate it accordingly
Given a matrix X, 1st add a column to the matrix whose elements are the summation of each rows. Then add a row to the matrix who...

1 month ago

Solved


An array is given. Find the unique elements of the array. [keep the sequence unchanged]
An array is given. Find the unique elements of the array. [keep the sequence unchanged] For example if input x=[2 ,4 , 9 ,2 ,...

1 month ago

Solved


An array is given that contains the marks. Find out the highest 3 marks
An array is given that contains the marks received by a group of students in their class test. Find out the highest 3 marks rec...

1 month ago

Solved


Easy Sequences 91: Generalized McCarthy-91 Recursive Function
The McCarthy 91 function is a recursive function, defined by the computer scientist John McCarthy as a test case for formal veri...

1 month ago

Solved


Compute the area of the shoemaker’s knife
A shape resembling a shoemaker’s knife is constructed from a semicircle with diameter with two semicircular “bites” of diameter...

1 month ago

Solved


Integer vector optimal lossless deduplication
You're given an integer vector A, a Min scalar and a Max scalar. You can assume all elements in A are in [Min,Max] range, and nu...

1 month ago

Solved


Repeatitive Summation
Given numeric vectors x, a and b, perform the following operation - a represents a vector of numbers and b represents a vector ...

1 month ago

Solved


Find patterns in subprime Fibonacci sequences
Lots of Cody problems involve Fibonacci and Collatz sequences. Fibonacci sequences start with two numbers, and later terms are c...

1 month ago

Solved


Easy Sequences 90: Triple Summation of a Combinatorial Function
Given a positive integer , we are asked to evaluate the following triple summation: The symbol is the combin...

1 month ago

Solved


Easy Sequences 89: Double Summation of a Trigonometric Product
Given and angle in radians and a positive integer , evaluate the following product summation: which 'dir...

1 month ago

Solved


Easy Sequences 88: Double Summation of a Combinatorial Function
Given two positive integers and , , we define the function as the sum of the reciprocals of the products of all combinations o...

1 month ago

Solved


Determine if input is a Harshad number
In mathematics a harshad number (or Niven number) in a given number base is an integer that is divisible by the sum of its digit...

1 month ago

Solved


JannaT is Loved By Me
JannaT was sTarTed loved by me and that time was in 2020. A year when JannaT will starT loving me when the year divided from th...

1 month ago

Solved


Easy Sequences 84: Digits of Powers of 5
OEIS sequence #A008566, deals with the following series: This sequence is the digits of powers of 5 listed si...

1 month ago

Solved


Easy Sequences 83: Digits of Powers of 3
This problem is a simpler version of 'Easy Sequences 82: Digits of Powers of 2'. Given integers and , we are asked to return th...

1 month ago

Solved


IQpuzzler Challenge #2: Find all possible solutions on an empty 4-by-5 board with 5 pieces, rotating and flipping pieces allowed
We are playing a simplified version of IQpuzzler, with a smaller board of 4-by-5 spaces and just 5 pieces, as shown in the pictu...

1 month ago

Solved


Find the dividend
Given a vector of pairwise coprime positive integers, p, and a vector of corresponding remainders, r, return a positive integer,...

1 month ago

Solved


Find a subset that divides the vector into equal halves --- HARD MODE
This problem is the same as Ned Gulley's problem 660, but the input arrays will be larger. As in problem 660, given a vector ...

1 month ago

Solved


01-01: 正弦波の生成
「MATLABで学ぶ実践画像・音声処理入門」のプログラム1-1 と同じ正弦波を、サンプリング周波数 10kHz で生成し、返却する関数を作成せよ。

1 month ago

Solved


Intersection points of a polynomial
Find the intersection points of a polynomial, given by its vector of coefficients with the X-axis and the Y-axis. Input: a poly...

1 month ago

Solved


Harmonic series counting
The function takes a positive limit as input, And counts how many terms must be summed in the harmonic series: 1/1, 1/2, 1/3, ...

1 month ago

Solved


Easy Sequences 86: The "real" Hyperprimorials
In Easy Sequences 85, we define the hyperprimorial of , as a exponent ladder of primes numbers from the -th prime down to first ...

1 month ago

Solved


Easy Sequences 85: Hyperprimorials
Given an integer , the primorial of , , is defined as product of all primes from to the -th prime. In other words, if is the ...

1 month ago

Solved


Easy Sequences 82: Digits of Powers of 2
In Project Euler Problem #16, we are asked for sum of the digits of powers of 2. Here we will be asked for more than that. Give...

1 month ago

Solved


List unitary divisors of a number
A unitary divisor of a number divides and satisfies gcd(,) = 1. For example, 9 is a unitary divisor of 18 because gcd(9,2) = ...

1 month ago

Load more