문제를 풀었습니다


Approximation of an integral - Riemann sum
Riemann sum is a certain kind of approximation of an integral by a finite sum. In this problem, I want you to use Midpoint Riem...

1년 초과 전

문제를 풀었습니다


String Manipulator
Write a script that takes a string as an input and returns a cell array containing – I. the count of vowels. II. Find the ind...

1년 초과 전

문제를 풀었습니다


Count of Unique Elements of a Vector
Count the number of times each unique element appears in a vector. Example: Input x = [2 9 1 2 4 9 2] Output y = [1 1; 2 3; 4...

1년 초과 전

문제를 풀었습니다


Time reverse indices
Time reverse the index values as follows IndexIn = [7 1 0] IndexOut = [7 6 0] Note that the indices are zero based and so...

1년 초과 전

문제를 풀었습니다


Toads and Frogs Puzzle
On a one-dimensional board with n + m + 1 cells, there are n counters in the first n cells representing Toads and m counters in ...

1년 초과 전

문제를 풀었습니다


XOR fibonacci
a & b are the first two terms in the xor fibonacci sequence. Find the nth term of that sequence. XOR fib sequence is that in ...

1년 초과 전

문제를 풀었습니다


Find the shortest distance between a point and a straight line.
Given the Cartesian coordinates of three points A, B and C (in a flat Euclidean space), find the shortest distance between the ...

1년 초과 전

문제를 풀었습니다


How many ways?
Create a program to determine in how many ways can a regular n-gon be divided into n-2 triangles?

1년 초과 전

문제를 풀었습니다


Intrication de deux vecteurs
Ecrire une fonction "intric" qui prend en entrée un vecteur ligne v1 et un vecteur ligne v2 et renvoie le vecteur ligne vres don...

1년 초과 전

문제를 풀었습니다


Round up to π

1년 초과 전

문제를 풀었습니다


Modulo of sum of square of first n primes with 24

1년 초과 전

문제를 풀었습니다


Determine if vector has any zeroes
Return 1 if vector has atleast 1 zero, else return 0

1년 초과 전

문제를 풀었습니다


Return longest string in 1-D array of strings
Find the longest string in an array of strings. Return an empty string if the initial array is empty. If there are multiple stri...

1년 초과 전

문제를 풀었습니다


Sort vector by number of prime factors of each element
Sort a given array based on how many prime factors each term has. Sort from least to greatest and output original values. Ex: ...

1년 초과 전

문제를 풀었습니다


Travelling Salesman Problem (TSP)
Find a short way through given points. This is the travelling salesman problem. But the solution should be a fast and small func...

1년 초과 전

문제를 풀었습니다


Make the first letter of a sentence Capital.
In this problem you will be given a string of 2 or 3 lines. Your work is to make the first letters of every line Capital. You wi...

1년 초과 전

문제를 풀었습니다


Draw a triangle of ones
For any given n, return a matrix that includes a triangle of ones of height n: Example n = 3 output = [0,0,1,0,0 ...

1년 초과 전

문제를 풀었습니다


Create a column vector of n elements between a and b (both included)
Given lower limit a and an upper limit b, create a column vector of n elements inclusive of a and b. For example: a = 1, b = 4,...

1년 초과 전

문제를 풀었습니다


Exhaust all possible logical vectors
Input a length argument and list all possible logical vectors of that length. My solution is of size 29. Can you find an even s...

1년 초과 전

문제를 풀었습니다


A KING AND 100 PRISONERS

1년 초과 전

문제를 풀었습니다


Flip the diagonal values
Write a program that flip the elements of main diagonal , upper and lower diagonal values of a sqare matrix. For example if a ...

1년 초과 전

문제를 풀었습니다


Calculate Triangle Area: A, B and Beta is given

1년 초과 전

문제를 풀었습니다


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

1년 초과 전

문제를 풀었습니다


Dominant Matrix - 01
A matrix is said to be diagonally dominant if for every row of the matrix, the magnitude of the diagonal entry in a row is large...

1년 초과 전

문제를 풀었습니다


Original coordinate of the min element of a subset of elements

1년 초과 전

문제를 풀었습니다


Sum of 2 numbers in array
Given an array and a target sum, return true if any 2 numbers in the array sum up to the given target sum. Both numbers cannot h...

1년 초과 전

문제를 풀었습니다


Identifying teenager
Suppose the age of a person is given. If he/she is a teenage, answer is 'yes'. Otherwise, the answer is 'no'.

1년 초과 전

문제를 풀었습니다


Zero or hero
A number will be given as an input. You can be hero if it's not zero. (Just for fun)

1년 초과 전

문제를 풀었습니다


Let's create histogram data by yourself.
We'd like to create histogram data, which first column shows the data, and second column shows the frequency. input = [1, 2, 1,...

1년 초과 전

문제를 풀었습니다


Fangs of pseudo-vampire number
given a number, find all the fangs of that number. A pseudo-vampire number can have multiple of fangs. The output should be a...

1년 초과 전

더 보기