문제를 풀었습니다


Modified run-length companion vector
Given a vector x, return a vector that indicates the run length of any value in x. Each element in output vector shows how many ...

3년 초과 전

문제를 풀었습니다


Guess the number I'm thinking of
In this game you are competing against two other people to guess the number that I'm thinking of. # I randomly choose an *i...

3년 초과 전

문제를 풀었습니다


Create a code for XNOR
Given two inputs, output XNOR of those two

3년 초과 전

문제를 풀었습니다


Encode Me From The Past
Given this input x = 2, 5, 1, 2, 4, 1, 1, 3 output should be (Five 2's, Two 1's, One 4, Three 1's) [2 2 2 2 2 1 1 4 1...

3년 초과 전

문제를 풀었습니다


Freebies anyone? No!!!!
Feel free to copy paste all the tests and voila you solved the problem

3년 초과 전

문제를 풀었습니다


Create sine function out of cosine
Please don't use sin(x) directly

3년 초과 전

문제를 풀었습니다


Implement zero-based indexing for Matrices
Given an input vector and position (which is zero based) output the value Example: x = [1 2; 4 5] pos = [0 1] value = 5 ...

3년 초과 전

문제를 풀었습니다


Count me in
Count the number of occurrences of the second input in the first input Ex. x1 = 12344455511; x2 =2; output = 1 ...

3년 초과 전

문제를 풀었습니다


Convert decimal to binary and then generate the minimum binary it can with jumbling
input is 10 --> 1010 output should be 3 --> 0011 input 23 --> 10111 output should be 15 --> 01111

3년 초과 전

문제를 풀었습니다


Beat the test suite if you can :)
Solve this problem based on clues in the test suite.

3년 초과 전

문제를 풀었습니다


Create cosine function out of sine
Please dont use cos(x) directly

3년 초과 전

문제를 풀었습니다


Basic commands - Least common multiple
Make a function which will return least common multiple of "a" and "b" Example: a=8; b=6; y=24;

3년 초과 전

문제를 풀었습니다


Sums of cubes and squares of sums
Given the positive integers 1:n, can you: 1. Compute twice the sum of the cubes of those numbers. 2. Subtract the square...

3년 초과 전

문제를 풀었습니다


English to Pig Latin Translator
Pig latin is a faux-language based off of English. The rules are as follows (excerpted from the wikipedia entry for Pig Latin): ...

3년 초과 전

문제를 풀었습니다


Determinant of a 3x3 Matrix
Return the determinant of a 3x3 matrix. The built-in Matlab function det is not allowed.

3년 초과 전

문제를 풀었습니다


How many bottles can you drink?
Sometimes if you buy a drink in a glass bottle you can return that bottle and get some money back. Let's assume we have "x" a...

3년 초과 전

문제를 풀었습니다


Basics - not so easy division
Please make a function whcih divides x/y, but pay attention for some exceptions with NaN,0,Inf. Sometimes return "ERROR" instead...

3년 초과 전

문제를 풀었습니다


Basic commands - rounding
make a function which will round to integer, which is nearer to zero. Example x=[-2.5 2]; y=[-2 2];

3년 초과 전

문제를 풀었습니다


Basic commands - Greatest common divisor
Please write a function, which, will put as output greatest common divisor. Example: A = [-5 17; 10 0];...

3년 초과 전

문제를 풀었습니다


Basic commands - amount of inputs
Make a function, which will return amount of given inputs Example: amountinput(1,2,4,3,10) -> 5 , because we gave functio...

3년 초과 전

문제를 풀었습니다


Which coins to give
I was in shop today. I admired, how shop assistant had to think, which coins to give me. The task is we have a vector v=[0.5 0....

3년 초과 전

문제를 풀었습니다


cross in array
Make a cross from "1" in odd size array. Other value from array should be equal to "0"; As input you get length of side of arra...

3년 초과 전

문제를 풀었습니다


BASICS - sum part of vector
Please make a function, where as input you get vector "x" and and vector "c", where in "c" vector you get indexes to sum. Examp...

3년 초과 전

문제를 풀었습니다


What's size of TV?
Many people buy TV. Usually they ask about diagonal. But also important are width and height. Let's assume that all TV have rati...

3년 초과 전

문제를 풀었습니다


Remove the air bubbles from a vector
_*A reduced version of Problem 112*_ Given a column vector v, return a vector w in which all the zeros have "bubbled" to the ...

3년 초과 전

문제를 풀었습니다


Some Assembly Required
The input to this function is a matrix of real numbers. Your job is to assemble the rows of the matrix into one large row that ...

3년 초과 전

문제를 풀었습니다


(Linear) Recurrence Equations - Generalised Fibonacci-like sequences
This problem is inspired by problems <http://uk.mathworks.com/matlabcentral/cody/problems/2187-generalized-fibonacci 2187>, <htt...

3년 초과 전

문제를 풀었습니다


Fibonacci Decomposition
Every positive integer has a unique decomposition into nonconsecutive Fibonacci numbers f1+f2+ ... Given a positive integer n, r...

3년 초과 전

문제를 풀었습니다


How many Fibonacci numbers?
Find the number of unique Fibonacci numbers (don't count repeats) in a vector of positive integers. Example: x = [1 2 3 4...

3년 초과 전

문제를 풀었습니다


Mid-term report
You just got your mid-term report, but it's full of ones and twos :(. So before you give it to your parents, you change it, in o...

3년 초과 전

더 보기