Feeds
已解决
Change matrix to vector
Vector is a matrix whose size is 1 x n or n x 1. Change matrix to vector. x = 4 3 5 1 ...
7 years 前
已解决
Sort a list of complex numbers based on far they are from the origin.
Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...
7 years 前
已解决
Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...
7 years 前
已解决
Make one big string out of two smaller strings
If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...
7 years 前
已解决
Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....
7 years 前
已解决
Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];
7 years 前
已解决
Write a code that will follow the equation y = x * (x + x) * x.
If x = 5, y = 5 * (5+5) * 5 = 250
7 years 前
已解决
ASCII code of a leter.
Given the letter, the output will show the corresponding ASCII code.
7 years 前
已解决
Annual Salary
What is the annual salary of Mr. Cody if he works 40 hours a week and gets $x per hour and a yearly bonus of $2000? (Let, 50 wee...
7 years 前
已解决
find the mean of all elements in a matrix
given a matrix, just find the mean of all elements in the matrix
7 years 前
已解决
find a specific element from an matrix
Find the element from matrix which is in 2nd row and 3rd column.
7 years 前
已解决
Calculating cost
You sold a Product at $x and gain 10% What was the cost of the product?
7 years 前
已解决
Find the longest sequence of 1's in a binary sequence.
Given a string such as s = '011110010000000100010111' find the length of the longest string of consecutive 1's. In this examp...
7 years 前
已解决
Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...
7 years 前
已解决
Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...
7 years 前