Feeds
已解决
Circumscribed circles
Given the lengths of the 3 sides of a triangle, output the radius of the circumscribed circle. Example: [3 4 5] -> 2.5
1 year 前
已解决
Is the Point in a Circle?
Check whether a point or multiple points is/are in a circle centered at point (x0, y0) with radius r. Points = [x, y]; c...
1 year 前
已解决
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 + ...
1 year 前
已解决
De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...
1 year 前
已解决
Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...
1 year 前
已解决
Bell Triangle
Form the bell triangle upto nth bell number posotion; * if n=5 * y= [1 0 0 0 0; 1 2 0 0...
1 year 前
已解决
Balanced number
Given a positive integer find whether it is a balanced number. For a balanced number the sum of first half of digits is equal to...
1 year 前
已解决
Pentagonal Numbers
Your function will receive a lower and upper bound. It should return all pentagonal numbers within that inclusive range in ascen...
1 year 前
已解决
How many trades represent all the profit?
Given a list of results from trades made: [1 3 -4 2 -1 2 3] We can add them up to see this series of trades made a profit ...
1 year 前
已解决
Flag largest magnitude swings as they occur
You have a phenomenon that produces strictly positive or negative results. delta = [1 -3 4 2 -1 6 -2 -7]; Marching through thi...
1 year 前
已解决
Find the nearest prime number
Happy 5th birthday, Cody! Since 5 is a prime number, let's have some fun looking for other prime numbers. Given a positive in...
1 year 前
已解决
I Plead the Fifth
Write a function to provide a yes or no answer to the input string. However, it must plead the 5th amendment (return an empty st...
1 year 前
已解决
Extra safe primes
Did you know that the number 5 is the first safe prime? A safe prime is a prime number that can be expressed as 2p+1, where p is...
1 year 前
已解决
Solve the set of simultaneous linear equations
Given this pair of simultaneous linear equations: 2x + 3y = 23 3x + 4y = 32 Find the solution set (x,y)
1 year 前
已解决
Predicting life and death of a memory-less light bulb
*💡 💡 💡 💡 💡 💡 💡 💡 💡 💡 💡 💡 💡 💡 &...
1 year 前
已解决
Sum of first n terms of a harmonic progression
Given inputs a, d and n, return the sum of the first n terms of the harmonic progression a, a/(1+d), a/(1+2d), a/(1+3d),....
1 year 前
已解决
Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock.
Submit your answer to this problem a multiple of 5 seconds after the hour. Your answer is irrelevant; the only thing that matte...
1 year 前
已解决
Spot the First Occurrence of 5
This problem series invites you to solve two simple problems related to the integer NUMBER FIVE, in order to celebrate <https://...
1 year 前
已解决
Sum the Digits of a Number
Given an integer, sum the digits repeatedly until you end up with a single value less than 10. For example, if you add the di...
1 year 前
已解决
Write c^3 as sum of two squares a^2+b^2
write c^3 as sum of two squares a^2+b^2. a and b must be integer and greater than zero. For example 5^3 = 2^2 + 11^2 5...
1 year 前
已解决
center of mass
R is a given matrix with size [n,2]. R(i,:) is interpreted as the 2D-position of a mass point with mass i. Calculate the center ...
1 year 前
已解决
Coin distribution
Imagine, u r in a shop. ur bill is n(2200). u want to pay the bill with minimum no of coins u have. u've coins of - 2000,1000...
1 year 前
已解决
A Simple Tide Gauge with MATLAB
*∿ ∿ ∿ ∿ ∿ ∿ ∿ ∿* You are standing in a few inches of sea water on a beach. You a...
1 year 前
已解决
How to subtract?
*± ± ± ± ± ± ± ± ± ± ±* * Imagine you need to subtract one...
1 year 前
已解决
Circle/Pentagon Overlap
Your function will be provided with the five vertices of a pentagon (p) as well as the center point (cp) and radius (r) of a cir...
1 year 前
已解决
Convert Volume Mixing Ratio to Density
The partial pressure of a constituent gas species of the atmosphere can be expressed in parts per million by volume. For exampl...
1 year 前
已解决
Pressure for a given Above Sea Level Altitude
For altitudes up to the stratosphere (around 11 km above mean sea level), the air pressure can be estimated from: with where...
1 year 前
已解决
Air Density from Temperature and Pressure
The density of air can be estimated from the product of molar mass and molar density: Write a function that finds the densi...
1 year 前
已解决
Characterize fluid flow in a pipe as to laminar or turbulent
In fluid mechanics, characterizing the flow in a pipe is essential to predicting its behavior. The flow pattern can either be la...
1 year 前







