Gelöst


Make an awesome ramp for a tiny motorcycle stuntman
Okay, given a vector, say v=[1 3 6 9 11], turn it into a matrix 'ramp' like so: m=[1 3 6 9 11; 3 6 9 11 0; 6 9 ...

mehr als ein Jahr vor

Gelöst


Back to basics 23 - Triangular matrix
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, return a matrix with all elements above a...

mehr als ein Jahr vor

Gelöst


Remove NaN ?
input -> matrix (n*m) with at least one element equal to NaN; output -> matrix(p*m), the same matrix where we deleted the enti...

mehr als ein Jahr vor

Gelöst


Remove the air bubbles
Given a matrix a, return a matrix b in which all the zeros have "bubbled" to the top. That is, any zeros in a given column shoul...

mehr als ein Jahr vor

Gelöst


Infinite precision division
Develop a function that will divide a very very large integer numerator, supplied to function as a string (e.g., '12233344445555...

mehr als ein Jahr vor

Gelöst


Cipher and Decipher the message - 3 key

mehr als ein Jahr vor

Gelöst


Hexagonal numbers on a spiral matrix
Put hexagonal numbers in a ( m x m ) spiral matrix and return the sum of its diagonal elements. Formula of hexagonal numbers ...

mehr als ein Jahr vor

Gelöst


How to add?
* Imagine you are in 2222 Anno Domini, when everyone must learn how to add, * and competing for the highly prestigious post of,...

mehr als ein Jahr vor

Gelöst


List the emirps
An emirp is a prime number that becomes a different prime when reversed. The numbers 13, 17, and 149 are emirps, but 11, 19, and...

mehr als ein Jahr vor

Gelöst


Compute the nth Pythagorean prime
Pythagorean primes have the form p = 4n+1, where n is an integer, and they can be written as the sum of squares of two integers....

mehr als ein Jahr vor

Gelöst


Decipher the message - same key for all digits
You will be given a input number (eg) x='gdkkn' you have to figure out the dechiper key and match it with given input and deci...

mehr als ein Jahr vor

Gelöst


Decipher the number 3 - 10 keys

mehr als ein Jahr vor

Gelöst


Card Game
This is an overly simplified and highly modified version of card game Twenty-Nine. A deck of 100 unique cards (hypothetical) ...

mehr als ein Jahr vor

Gelöst


Decipher the number 2 - 3 keys

mehr als ein Jahr vor

Gelöst


decipher the number 1 - same key for all digits :)
You will be given a input number (eg) x=12345 you have to figure out the dechiper key and match it with given input and deciph...

mehr als ein Jahr vor

Gelöst


NCHOOSEK - Time Optimization
Input V —— Set of all choices, a vector of N, 1 < N < 100 K —— Number of selected choices, a scalar, 0 <= K <= N Output C ——...

mehr als ein Jahr vor

Gelöst


Combinations without using nchoosek
You have to generate a matrix with all possible combinations of n elements *taken 2* at a time, *without using nchoosek(1:n,2)* ...

mehr als ein Jahr vor

Gelöst


How to multiply?
Imagine you are in 3012 Anno Domini, when everyone must learn how to multiply, and competing for the highly prestigious post of...

mehr als ein Jahr vor

Gelöst


Determine whether a number is a fibodiv number
The number 14 is a fibodiv number because you can divide it into 1 and 4, use those numbers as the seeds for a Fibonacci sequenc...

mehr als ein Jahr vor

Gelöst


Find the nth nude number
The number 672 is a nude number because it openly displays three of its divisors: 6, 7, and 2. In other words, a nude number is ...

mehr als ein Jahr vor

Gelöst


Find the smallest integer m such that n divides m!
Write a function that takes an integer and finds the smallest integer whose factorial is divisible by . For example, if , then...

mehr als ein Jahr vor

Gelöst


Sum of all the divisors of n

mehr als ein Jahr vor

Gelöst


Compute the Sequence of the Day
A sequence starts with 1 and 2, and each subsequent term is the sum of the digits of the product of the previous two terms. As a...

mehr als ein Jahr vor

Gelöst


Find numbers in the Popular Computing Z-sequence
Here’s a quick one. In 1977 the magazine Popular Computing sought “problem situations for which the computer is the best (if not...

mehr als ein Jahr vor

Gelöst


Identify Ruth-Aaron numbers
After Hank Aaron hit his 715th home run and passed Babe Ruth’s total of 714, Carl Pomerance noticed that the union of the prime ...

mehr als ein Jahr vor

Mehr laden