已解决


Draw "T" inside a Zero Matrix
Given a x-by-x matrix filled with zeros (x> 2). Use 1 to draw a letter "T" into it! Like this: x = 5, y = 1 1 1 1 1 0 0 1 0 0...

2 years 前

已解决


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

2 years 前

已解决


Find distance travelled by an object starting from rest in time 't' and linear acceleration 'a' = 3t
Find distance travelled by an object starting from rest in time 't' with linear acceleration a = 3t. You are given time t as an ...

2 years 前

已解决


Find all prime factors of the input
Given an input x, find its all prime factors. Return the vector with all factors in ascending order. Efficiency is the key here...

2 years 前

已解决


Invert a Logical Matrix
Given a logical matrix, invert it

2 years 前

已解决


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

2 years 前

已解决


Caesar Cipher Shift
Given a word and its encrypted version using the caesar cipher, find the shift used.

2 years 前

已解决


Monty Python and the Holy Grail: Crossing the Bridge of Death
To cross the Bridge of Death, your function must return the numerical value for the airspeed velocity of an unladen swallow

2 years 前

已解决


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 years 前

已解决


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 years 前

已解决


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 years 前

已解决


Zigzag array
Given an vector of integers, rearrange the array so that the array looks like: [largest value, smallest value, 2nd largest valu...

2 years 前

已解决


Draw 'W'
For any given n, return a matrix of height n and width 4n-3 containing a W of ones. Example: n=2 ans= [1 0 1 0 1 0 1 0 1 0...

2 years 前

已解决


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

2 years 前

已解决


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

2 years 前

已解决


Determine if all elements are odd
Given an array, return true if all of the elements are odd. ex. x = [3 4 1] allOdd(x) ans = false ex. x = [3 5 7; 5 9...

2 years 前

已解决


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

2 years 前

已解决


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 years 前

已解决


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 years 前

已解决


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 years 前

已解决


Calculate Percentage
Given marks obtained and total marks, calculate the percentage.

2 years 前

已解决


Momentum Calculation
A shopping cart of mass 'm1' is traveling with velocity 'u' and collides with a second shopping cart of mass 'm2.' The two shopp...

2 years 前

已解决


Total resistance of a network of resistors in series and parallel
What is the total resistance of a network of resistors in series and in parallel? A matrix R contains the resistances (in Ohm) ...

2 years 前

已解决


Sum of two number using (regexp, varargin) comand?
Sum two number a &b and get there result in c using the rexp and varargin comand.

2 years 前

已解决


Total resistance of resistors in parallel
What is the total resistance of a number of resistors in parallel? A vector R contains the resistances (in Ohm) of n resistors,...

2 years 前

已解决


Total resistance of resistors in series
What is the total resistance of a number of resistors in series? A vector R contains the resistances (in Ohm) of n resistors, w...

2 years 前

已解决


Draw the symbol '+'
Draw '+' in an x-by-x matrix (where x is odd and x >3) Example: x = 5 y = [0 0 1 0 0 0 0 1 0 0 1 1 1 1 1 0 ...

2 years 前

已解决


Add the number of horizontal and vertical movements to each matrix element
Given n, create a square matrix and with element (1,1) = 1, add 1 to each element for each horitizonal and vertical movement. E...

2 years 前

已解决


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

2 years 前

已解决


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 years 前

加载更多