해결됨

Sum of Cubes
Given n, find the sum of cubes of integers till n. For example, if n = 3, then answer is 1^3 + 2^3 + 3^3 = 36.

29일 전

해결됨

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

29일 전

해결됨

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

29일 전

해결됨

Calculate the surface area of a sphere
Given the radius of a sphere, calculate the surface area

29일 전

해결됨

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

29일 전

해결됨

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

29일 전

해결됨

Mix it up!
Given an input string S, return a new string B, that is created by taking one character from the front and then the end iterativ...

29일 전

해결됨

Determine (and provide as output in decimal form) all the harshad numbers base B (B-Harshad) from a given array of decimal numbe...

29일 전

해결됨

Two sum
Give a vector of numbers and a target, return indices of two numbers such that they add up to the target

30일 전

해결됨

Find the median of elements in vector without using in built median function
Given a vector, find the median of the vector whose length is odd without using in built median function. Input : [1,1,2,4,5,5,...

30일 전

해결됨

Remove elements in a vector
Given a number x and a vector y, remove all occurrences of x in y. Examples: Input1 x = 1 Input2 y = [1 2 3 5] Output ...

30일 전

해결됨

Calculate the weight of a cow
Initially, the cow weighs 200kg. If it gains x kg every day, how much does it weight after y days?

30일 전

해결됨

Test for CODEchella
Test for CODEchella Find the fourth-root of a number

30일 전

해결됨

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

30일 전

해결됨

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

30일 전

해결됨

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

30일 전

해결됨

Invert a Logical Matrix
Given a logical matrix, invert its values

30일 전

해결됨

Draw a fancy '7' in a zero matrix!
Given a x-by-x matrix filled with zeros (x is odd and > 3). Use 7s to draw a number 7 into it! Like this: x = 5, y = 7 7 7 7 7...

30일 전

해결됨

Distance of Car
If a car is going x miles per hour, how long does it take to get y miles?

30일 전

해결됨

Find the number of zeros in a matrix
Find the number of zeros in a matrix

30일 전

해결됨

Determine if integer is even
Write a function to determine if an input integer(n) is even. The output should be a boolean (true or false).

30일 전

해결됨

Find the number of ones in a matrix.
Find the number of ones in a matrix.

30일 전

해결됨

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

30일 전

해결됨

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

30일 전

해결됨

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

30일 전

해결됨

Find the number of terms in Arithmetic progression
Given a, Tn and d find the number of terms in the AP

30일 전

해결됨

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

30일 전

해결됨

Determine if the inputs are divisible by both 3 and 5.
Given a integer x: return true if it is divisible by both 3 and 5, return false if it is not divisible by either 3 or 5.

30일 전

해결됨

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

30일 전

해결됨

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

30일 전