Gelöst


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

etwa 2 Jahre vor

Gelöst


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

etwa 2 Jahre vor

Gelöst


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

etwa 2 Jahre vor

Gelöst


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

etwa 2 Jahre vor

Gelöst


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

etwa 2 Jahre vor

Gelöst


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

etwa 2 Jahre vor

Gelöst


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

etwa 2 Jahre vor

Gelöst


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

etwa 2 Jahre vor

Gelöst


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

etwa 2 Jahre vor

Gelöst


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

etwa 2 Jahre vor

Gelöst


Complete a geometric sequence
In Cody Problem 59786 minnolina asks us to find the integer that completes a randomly sorted arithmetic sequence with one missin...

etwa 2 Jahre vor

Gelöst


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

etwa 2 Jahre vor

Gelöst


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

etwa 2 Jahre vor

Gelöst


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

etwa 2 Jahre vor

Gelöst


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

etwa 2 Jahre vor

Gelöst


Compress strings (not springs)
Please remove excess space, limit one space between others, and no space before punctuation marks. * For example, 'Trendy , ...

etwa 2 Jahre vor

Gelöst


How many palindromes?
* Given a set of letters, count all possible palindromes, using all of those letters. * For example, if the set is {'A' 'A' 'A'...

etwa 2 Jahre vor

Gelöst


chance in percent for minimum K heads when a good coin is tossed N times?
For example, chance is 100% for minimum 0 heads when a coin is tossed 7 times. Chance is 50% for minimum 2 heads when a coin is...

etwa 2 Jahre vor

Gelöst


finding vector pair with min angle between them
given a matrix with more than one row , compare row vectors of the given matrix and find the pair with the minumum angle between...

etwa 2 Jahre vor

Gelöst


Calculating distance of lightning based on time delay
If we know the time delay between when we see lightning and hear thunder then we can calculate approximate distance(in meters) o...

etwa 2 Jahre vor

Gelöst


Express numbers as the sum of a prime, a square, and a cube
While traveling on an interstate highway, I noticed a sign that gave distances to three places. The distances were 3, 8, and 9 m...

etwa 2 Jahre vor

Gelöst


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

etwa 2 Jahre vor

Gelöst


Determine if given number is perfect
A number is perfect if it is equal to the sum of its factors, excluding itself. Example The number 6 is perfect since its fact...

etwa 2 Jahre vor

Gelöst


Gaussian elimination
Get the Gussian elimination of the Matrix Given You cannot use built-in Matlab functions triu :)

etwa 2 Jahre vor

Gelöst


Roman numbers: how old is that building?
The front of old buildings sometimes show the year when they were built in roman numbers. These number are rather confusing and ...

etwa 2 Jahre vor

Gelöst


Write a code to implement the improved Euler's method to integrate a simple function
Euler's method approximates the solution to a differential equation as where . It's possible to improve on Euler's method by ...

etwa 2 Jahre vor

Gelöst


Write a code to implement Euler's method to integrate a simple function
Euler's method approximates the solution to a differential equation as where . The challenge is to write a code that can take...

etwa 2 Jahre vor

Gelöst


Valid Chess Moves
Using standard Algebraic notation ('' for a pawn), given previous move and a next move, output true if it is a valid move or fal...

etwa 2 Jahre vor

Gelöst


Back to basics 2 - Function Path
Covering some basic topics I haven't seen elsewhere on Cody. Given a string that is the name of a MATLAB function, return a s...

etwa 2 Jahre vor

Gelöst


Calculate Alcohol By Volume with Original and Final Gravity
Given an initial gravity of un-fermented wort (OG) and a final gravity of fermented wort (FG), better known as beer, it is possi...

etwa 2 Jahre vor

Mehr laden