Gelöst


Compare a value to a vector
Given a random value X and a random vector Y. you have to compare X to the Vector Y and make a decision. case 1: X is a value i...

mehr als 3 Jahre vor

Gelöst


Knight Moves?
One of my favorite games are chess. Let’s do something with chess. If you don’t know chess, that’s completely fine. You can stil...

mehr als 3 Jahre vor

Gelöst


Generate Hadamard Matrix without using hadamard function
In mathematics, a Hadamard matrix, named after the French mathematician Jacques Hadamard, is a square matrix whose entries are e...

mehr als 3 Jahre vor

Gelöst


Generate Hadamard Matrix
In mathematics, a Hadamard matrix, named after the French mathematician Jacques Hadamard, is a square matrix whose entries are e...

mehr als 3 Jahre vor

Gelöst


Median filter over three values
Implement 1-D median filter over input vector x as described: Moving window size is 3 Output is middle/central value in moving...

mehr als 3 Jahre vor

Gelöst


Is this triangle right-angled (mixed sides)?
Implement function returning if triangle is right angled or not? Input argument is vector row with not ordered triangle sides. ...

mehr als 3 Jahre vor

Gelöst


Find the remainder - 01
Given an array of integers, find the remainder when the product of all the elements is divided by N

mehr als 3 Jahre vor

Gelöst


How many apples
You have x apples I take from you y apples now how many apples you have ?

mehr als 3 Jahre vor

Gelöst


Minimum Maximum Sort Array
sort one array by put minimum value followed by maximum as follow a=[2 3 1 5] and the solution is y=[1 5 2 3 3 2 5 1];

mehr als 3 Jahre vor

Gelöst


Polygon Interior Angle Sum
Given the number of sides of a regular polygon, find the sum of interior angles. Return 0 for input for which regular polygon a...

mehr als 3 Jahre vor

Gelöst


Compute frequency factors for the normal distribution
In frequency analysis in hydrology, the streamflow corresponding to a specified exceedance probability (or return period ) can...

mehr als 3 Jahre vor

Gelöst


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...

mehr als 3 Jahre vor

Gelöst


Easy Sequences 57: "Pretty-gorean" Triangles?
A positive integer is called a regular number, if and only if there exist a non-negative integer , such that . For some reason...

mehr als 3 Jahre vor

Gelöst


About jokes (and compression)
An argument can be made about jokes. The shorter they are, the funnier. Further explained here: https://en.wikipedia.org/wiki/Hu...

mehr als 3 Jahre vor

Gelöst


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...

mehr als 3 Jahre vor

Gelöst


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...

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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...

mehr als 3 Jahre vor

Gelöst


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...

mehr als 3 Jahre vor

Gelöst


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 ,...

mehr als 3 Jahre vor

Gelöst


An array is given that contains the marks received by a group of students in their class test. Find out the highest 3 marks received by the students?
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...

mehr als 3 Jahre vor

Gelöst


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...

mehr als 3 Jahre vor

Gelöst


Hermite Polynomials
Problem 1304 deals with Hermite polynomial of the physicist's type. In this problem, Return the n-th Hermite polynomial of the ...

mehr als 3 Jahre vor

Gelöst


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...

mehr als 3 Jahre vor

Gelöst


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...

mehr als 3 Jahre vor

Gelöst


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...

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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...

mehr als 3 Jahre vor

Gelöst


Easy Sequences 12: 50th Prime
Write a function that outputs the th prime after a given number . For example, the th prime after is . NOTE: If itself is pr...

mehr als 3 Jahre vor

Mehr laden