문제를 풀었습니다


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

2개월 전

문제를 풀었습니다


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

2개월 전

문제를 풀었습니다


Exponent of IEEE Single
Output the exponent bits as a uint8 of the IEEE representation of the single-typed 32-bit float input.

2개월 전

문제를 풀었습니다


Find Min and Max Differences in a Vector
Given an array of integers, return the absolute largest and smallest (non zero) difference between any two numbers in the array....

2개월 전

문제를 풀었습니다


Can you Jump?
You have been provided with input array of integers. You start with initial position at the first index of this input array, and...

2개월 전

문제를 풀었습니다


Vector slither sort!
Sort a numeric vector in the following format: [largest value, smallest value, second largest value, second smallest value, etc...

2개월 전

문제를 풀었습니다


Find the number of primes less than input
Given an integer n, determine the number of primes less than or equal to n.

2개월 전

문제를 풀었습니다


determine skid distance of car
Determine the distance a car skids to a stop given initial velocity (v) and time (t).

2개월 전

문제를 풀었습니다


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

2개월 전

문제를 풀었습니다


Sum of Arithmetic Progression
Given the starting number, difference and the number of terms - find the sum of the arithmetic progression.

2개월 전

문제를 풀었습니다


Draw a X
Given an input , create a square matrix of zeros with an X of ones. Ex. n = 3 drawX(3) [ 1 0 1 0 1 0 1 0 1 ] ...

2개월 전

문제를 풀었습니다


Caesar Cipher
Given a input word x and a shift n, encrypt the word with caesar cipher of shift n.

2개월 전

문제를 풀었습니다


Find two numbers that add up to the target value
Given a vector A and target n, return the indices of two numbers that add up to n. If there are multiple solutions, return the f...

2개월 전

문제를 풀었습니다


Length of shortest path in a directed graph.
Given a directed graph and a start and end node in the graph, return the minimum number of hops required to reach the end node f...

2개월 전

문제를 풀었습니다


Absolute Value of the Product of Complex Numbers
Find the absolute value (modulus) of the product of two complex numbers given by a + bi and c + di.

2개월 전

문제를 풀었습니다


Consecutive Pairs of Smooth Numbers from Set of Prime Numbers
Given an input set of prime numbers (p), generate all pairs of consecutive smooth numbers (x) (see Stormer's Theorem). For exam...

2개월 전

문제를 풀었습니다


Find the length of stream affected by a spill
When a contaminant is spilled into a stream, one might want to know how much of the stream is affected—e.g., the length over whi...

2개월 전

문제를 풀었습니다


Count the ways to make Scorigami
Regarding the sport known as American football, some people are such rabid fans that they can tell you the statistics of every p...

2개월 전

문제를 풀었습니다


Solve an ODE: concentrations predicted by the cells-in-series model
One approach for predicting mixing and transport of contaminants in a river is the cells-in-series model. The model divides a ri...

2개월 전

문제를 풀었습니다


varargin
Write a function that can take a diffrent Amount of inputs for every run Which gives you the sum of all Inputs. Example: f(a,b...

2개월 전

문제를 풀었습니다


Local Extrema
Given a 2D (m,n>1) matrix, replace an element if it is not a local extrema (minima/maxima), with 0 (zero). The comparison crite...

2개월 전

문제를 풀었습니다


Hyperperfect Numbers
A k-hyperperfect number is a natural number n for which the equality n = 1 + k(σ(n) − n − 1) holds, where σ(n) is the divisor ...

2개월 전

문제를 풀었습니다


Weird Diagonal Matrix!!
**If you have loved the problem, please like it below(Request)** Given an integer n, create a matrix whose diagonal elements wi...

2개월 전

문제를 풀었습니다


Leyland Primes
A Leyland Number is defined as a number of the form - x^y + y^x, or, x^y - y^x (x,y)>1 Given an array of numbers(>1), check...

2개월 전

문제를 풀었습니다


Draw a Diamond shape in ones Matrix with '0' s
Input will be odd numbers.The task is to make a Diamond shape in a ones matrix with '0's where the matrix will be a square matri...

2개월 전

문제를 풀었습니다


Spell musical triads
Chords form the basis of harmony in music. The most basic chords are triads, or groups of three notes. They are specified by thr...

2개월 전

문제를 풀었습니다


Matrix Transposition
Given a matrix and an index, perform matrix transposition as follows - Replace non-corner value of ith ring from outside, with...

2개월 전

문제를 풀었습니다


Define an arithmetic sequence
Given three numbers n, a, and d, define an arithmetic sequence of n terms with a being the initial term of the sequence and d be...

2개월 전

문제를 풀었습니다


Solve an ODE: precocious pair’s porcine pursuit
In our previous encounters with Matilda and Labrun, the scintillating siblings collected candy wrappers, amused others with card...

2개월 전

문제를 풀었습니다


Find the slope of a line that passes through two vectors
Given two vectors p1 and p2, return the slope of a line that passes through p1 and p2. Examples: Input [p1,p2] = deal([0,1],[...

2개월 전

더 보기