Solved


Mantissa of IEEE Single
Output the mantissa bits as a uint32 of the IEEE representation of the single-typed 32-bit float input. Store these bits in the ...

3 months ago

Solved


Finding valleys
You have a vector of altitudes (units are arbitrary) and need to find the depths of all the valleys. You also need to determine ...

3 months ago

Solved


Find the minimum element coprime to the rest in a set of 10 consecutive integers
In this video, Dr Barker argued that a set of 10 consecutive integers must have at least one integer coprime to the rest. For ex...

3 months ago

Solved


Remove Adjacent Pairs
Given an array of integers where adjacent elements may be identical, your task is to remove these adjacent pairs. If removing on...

3 months ago

Solved


Compute Farey sequences
Problem statement The Farey sequence of order consists of fractions between 0 and 1 expressed in reduced form in increasing or...

3 months ago

Solved


ICFP2024 004: Lambdaman 10
The ICFP2024 contest was held June29 thru July 1. The contest consisted of five parts: ICFP Language, Lambdaman maze, Starship f...

3 months ago

Solved


Reverse a string
Return a string with the characters in reverse order from a given input string Ex: my_str = "Ciao" function should output "...

3 months ago

Solved


Conditional transpose II
As in problem 60734, you're given two vectors, x and y, which might be row or a column vectors. Your task is to ensure that y ha...

3 months ago

Solved


Determine whether a number is a Ludic prime
Ludic numbers are formed by a sieve. Start with a list of the positive integers. Skip 1 and start with 2. Then delete every seco...

3 months ago

Solved


Pairs with Given Sum
Given an array of integers and a target sum, return all unique pairs whose sum is equal to the target. The output should be a ma...

3 months ago

Solved


Dominant Matrix - 02
It is a follow-up of the problem 55995. There, you found out whether a matrix is diagonally dominant or not. In this problem, y...

3 months ago

Solved


List numbers that cannot be expressed as the sum of two primes
The Goldbach conjecture claims that even numbers greater than 2 can be expressed as the sum of two prime numbers. What about the...

3 months ago

Solved


Radioactive Decay Chain
A radioactive decay chain consists of a series of nuclides, each decaying into the next. Suppose we have a chain of N isotopes:...

3 months ago

Solved


Make a Star Pyramid
Create a star pyramid. First line will have 1 star, second will have two stars and so on... a basic program which is easily done...

3 months ago

Solved


Mirror Image matrix across anti-diagonal
Given an input number x, create a mirror image matrix 'Y' across the anti-diagonal. For example, if x=3, Y = [1 2 3; ...

3 months ago

Solved


Create a Multiplication table matrix...
Create a product table in this format: P = [ 1 2 3 4 5; 2 4 6 8 10; 3 6 9 12 15; 4 8 12 1...

3 months ago

Solved


Make a logical diamond using GALLERY function
Inspired from <http://www.mathworks.com/matlabcentral/cody/problems/1078-make-a-diamond Problem 1078. Make a diamond> In thi...

3 months ago

Solved


Special matrix
Make a square matrix with this shape. For n=4 M = 1 1 0 0 1 0 1 0 0 1 0 ...

3 months ago

Solved


Built-out FFTShift
The task in hand is to replicate the built-in function - fftshift (with single input), but without using the function. However,...

3 months ago

Solved


Convert Celsius temperature to Fahrenheit
Given a temperature in Celsius, return the equivalent in Fahrenheit. Formula: F = C * 9/5 + 32Example: cel2fahr(100) returns 212...

3 months ago

Solved


Find the Longest Consecutive Increasing Path in a Matrix
Given a 2D matrix of integers, find the length of the longest path where each step moves to an adjacent cell (up, down, left, ri...

3 months ago

Solved


Web App POST using system curl (405 error fix)
This challenge is to create a curl command to interact with a Google Web App that takes a JSON input and returns the JSON and a ...

3 months ago

Solved


Triangle Area Using Heron's Formula
Given the three side lengths a, b, and c of a triangle, calculate its area using Heron's formula and round to 4 decimal places. ...

3 months ago

Solved


Count the vowels in a string
Given a string, return the number of vowels (a, e, i, o, u — case insensitive). Example: count_vowels('Hello World') returns 3

3 months ago

Solved


Replace All Below-Average Elements in a Matrix with Zero
Given a 2D matrix of numbers, find the mean of all elements. Replace any element that is strictly below the mean with 0. Return ...

3 months ago

Solved


Keep Only Even Numbers
Given a vector, return a new vector containing only the even numbers in their original order. Example: keep_evens([1 2 3 4 5 6])...

3 months ago

Solved


Reverse the characters of a string
Given a string, return the string with characters in reverse order. Example: rev_string('hello') returns 'olleh'

3 months ago

Solved


Sum the main diagonal of a matrix
Given a square matrix, return the sum of its main diagonal elements. Example: diag_sum([1 2 3; 4 5 6; 7 8 9]) returns 15

3 months ago

Solved


Determine if a number is prime
Given a positive integer n, return 1 if it is prime, 0 otherwise. Example: is_prime(7) returns 1, is_prime(4) returns 0

3 months ago

Solved


Count how many elements are above the mean
Given a vector, return the count of elements strictly greater than the mean of the vector. Example: above_mean_count([1 2 3 4 5]...

3 months ago

Load more