Resuelto


Leonardo primes
Leonardo numbers are defined by following recurrence relation: Leonard prime is Leonardo number which is also prime (see ...

11 días hace

Resuelto


Count the unitary divisors of a number
Cody Problem 56738 asks for a list of the unitary divisors of a number. For this problem, write a function to count the unitary ...

11 días hace

Resuelto


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

11 días hace

Resuelto


Sum the elements in rows of the Levine triangle
The Levine triangle starts as follows: Row 0: 2 Row 1: 1 1 Row 2: 1 2 Row 3: 1 1 2 To construct each row, r...

12 días hace

Resuelto


Determine whether a number is a Gaussian prime
A Gaussian prime is a number that cannot be factored. For example, is not a Gaussian prime because it can be factored as the p...

12 días hace

Resuelto


Palindrome Checker
Create a MATLAB function that checks whether a given string is a palindrome or not. A palindrome is a word, phrase, number, or o...

12 días hace

Resuelto


Matrix Rotation
Write a MATLAB function that rotates a given matrix by 90 degrees clockwise. The rotation should be performed in-place, without ...

12 días hace

Resuelto


Calculate the Distance to Source of Lightning
Lightning discharge heats air rapidly with lightning channels reaching temperatures of up to 50,000 degrees Fahrenheit (which is...

12 días hace

Resuelto


Rosenbrock's Banana Function and its derivatives
Write a function to return the value of <http://en.wikipedia.org/wiki/Rosenbrock_function Rosenbrock's two-dimensional banana fu...

13 días hace

Resuelto


Compress list
Given a non-empty list L of positif integers, compress the list so that only one occurrence is retained if two (or more) equal e...

13 días hace

Resuelto


Limiting Element Occurrences
You are given a list 'v' of numbers. This list may contain repeated numbers. Your objective is to create a new list that maintai...

13 días hace

Resuelto


Available ingredients + recipe -> number of cakes
Write a function Egg_Milk_Sugar(L, recipe) to determine the maximum number of cakes that can be prepared given a list of availab...

13 días hace

Resuelto


Extract Increasing Integers from Digit String
Given a string containing only digits, the function get_integers should return the list of increasing integers obtained by readi...

14 días hace

Resuelto


Pivot index
Let L be a vector of numbers. We are searching for the index n of the pivot element defined as follows: the dot product of the e...

15 días hace

Resuelto


Missing Number
Given a list of integers forming an arithmetic progression (where the difference between consecutive elements is constant), your...

15 días hace

Resuelto


Leader
An element of a list is called a "leader" if every element to its right (and not just the one immediately to its right) is stric...

15 días hace

Resuelto


Determine if a Digit is Isolated
A digit is considered isolated if both its left and right neighbors are different from itself. For example, in the number 776444...

15 días hace

Resuelto


Sort by absolute value
Given a list of numbers, arrange them in ascending order based on their absolute values. For example, for the list [-30, -5, 1...

15 días hace

Resuelto


Digits eliminate
Complete the function my_f(n,b) to return, for a given integer, the number obtained by removing the digits '0' and 'b'. If there...

15 días hace

Resuelto


Merge two integers
We want to merge the digits of two integers having the same number of digits to obtain a new integer whose digits are obtained b...

15 días hace

Resuelto


Counting the occurrences of a digit in a book
The printer has printed a book with 'p' pages. How many times did they use the character 'd'? In other words, how many times doe...

15 días hace

Resuelto


Replace with Lower
Given a list of integers, for each element, replace it with the minimum integer found in the sub-list to its strict right (exclu...

15 días hace

Resuelto


Sun angle
Determine the angle of the sun above the horizon based on the time of day. Assumptions: the sun rises in the East at 6h00, cor...

15 días hace

Resuelto


Identify full reptend primes

21 días hace

Resuelto


Create a dictionary
The goal is to write a function that returns a dictionary from a list of words or phrases and their definitions. Here is an exam...

22 días hace

Resuelto


Pairwise Euclidean Distance
Given two matrices A,B of dimensions NxK and NxL respectively, calculate the pairwise euclidean distance of all vectors (columns...

22 días hace

Resuelto


Estimating Euler's (Oi-ler-z) Number
Euler's number is an irrational constant given by Starting with x=0, count the number of times you can add a uniformly distrib...

22 días hace

Resuelto


The Birthday Phenomenon
First off, leap years are not being considered for this. In fact the year that people are born shouldn't be taken into considera...

22 días hace

Resuelto


Calculate the probability that at least two people in a group share the same birthday.
Calculate the probability that at least two people in a group share the same birthday. Given an integer input n, return to 0.015...

22 días hace

Cargar más