已解决


Possible Rugby Scores
Given a natural number s (> 4), representing a rugby team's score, return an n-by-3 matrix representing all n possible combinati...

3 years 前

已解决


Acid-Base Chemistry: Which side of the reaction is more favorable?
In an Acid-Base reaction, there is always going to be an acid, a base, a conjugate acid, and a conjugate base. When provided wit...

3 years 前

已解决


Euclidean distance from a point to a polynomial
A not uncommon problem in the area of computational geometry is to find the closest point to a straight line from a given point,...

3 years 前

已解决


Calculate Angle From Axis
Given coordinates x and y, an axis ("X" or "Y"), and a direction ("cw" or "ccw", meaning clockwise and counterclockwise, respect...

3 years 前

已解决


Interpolated Value Between Two Points
Given two points, and , a new location x, and a method "linear" or "cubic", return the value of a linear or cubic interpolant t...

3 years 前

已解决


Next Tribonacci Number
The "Tribonacci" sequence is an extension of the idea of the Fibonacci sequence: That is, each new term is the sum of the thr...

3 years 前

已解决


Just square the input
Square the number

3 years 前

已解决


Angle Between Analog Clock Hands
Given a datetime variable t, return the angle (in degrees) between the hour and minute hands of an analog clock at the time repr...

3 years 前

已解决


Boustrophedon
Given a vector v and a positive integer n, return an m-by-n matrix containing the elements of v row-wise, alternating left-to-ri...

3 years 前

已解决


Dartboard Average II
A dartboard arranges the numbers 1 to 20 such that each value is typically flanked by quite different values - for example, 20 i...

3 years 前

已解决


Triangle Coordinates
Given a natural number n, return two -element vectors, x and y, containing the coordinates of a triangular arrangement of points...

3 years 前

已解决


Is the number of 1s in a binary integer odd or even?
Your function should turn the input integers into binary form and count the number of 1s in the binary. If the number is odd, re...

3 years 前

已解决


List numbers that are not in the Fibonacci sequence
In the list of 4797 Cody problems, 53 deal with or refer to the Fibonacci sequence.* What about the other numbers? Write a funct...

3 years 前

已解决


Cricket - Represent Average in "Dulkars" and "Ses"
Sachin Tendulkar's Test average was 53.78. So if Tendulkar = 53.78, one dulkar = 5.378. Similarly, Roger Twose's average was 25....

3 years 前

已解决


Cricket - Peak Batting Average
Given a vector s of strings representing a batter's individual innings scores (in chronological order), return the highest batti...

3 years 前

已解决


Multiply each matrix element by its row index and add its column index.
Return a matrix the same size as the input, multiply each element by its row index and add its column index. Example: x = [ 1 ...

3 years 前

问题


List numbers that are not in the Fibonacci sequence
In the list of 4797 Cody problems, 53 deal with or refer to the Fibonacci sequence.* What about the other numbers? Write a funct...

3 years 前 | 0 | 9 个解题者

问题


List the nth term of Rozhenko’s inventory sequence
Consider a sequence constructed by repeated inventories. A new inventory begins each time a zero is encountered. The first few i...

3 years 前 | 1 | 12 个解题者

已解决


Cricket - How Much More to Beat Bradman?
Sir Don Bradman famously needed only 4 runs in his final innings to retire with an average of 100. Out for a duck, he ended inst...

3 years 前

已解决


Remove Duplicates
Remove duplicates from the vector of integers and display in sorted order

3 years 前

已解决


Check if a year is a leap year or not
Return 1 if a given year is a leap year or 0 if it is not

3 years 前

已解决


Slope intercept application
Find y given slope (m), x, and y intercept (b).

3 years 前

已解决


Determine if vector has any zeroes
Return 1 if vector has atleast 1 zero, else return 0

3 years 前

已解决


Compute the drag on a moving vehicle
We assume no rolling resistance, and the simple rule for Drag : , where is the density of the fluid (assumed at 1.2 ), is the ...

3 years 前

已解决


Cricket - Sort Batters by Distance Run
Given a string vector of batters' names, a vector of the total number of runs they scored, a vector of the number of 4s they sco...

3 years 前

已解决


Partial Pressure of Water Vapor from Relative Humidity
Buck (1996, 1981) published the following constants for the saturation pressure of water*: 6.1121 (mb) The saturation pressur...

3 years 前

已解决


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

3 years 前

已解决


Zero or hero
A number will be given as an input. You can be hero if it's not zero. (Just for fun)

3 years 前

已解决


Identifying teenager
Suppose the age of a person is given. If he/she is a teenage, answer is 'yes'. Otherwise, the answer is 'no'.

3 years 前

已解决


Create block matrix of integers (j+k-1) - Part I
Given m, n, p, and q, create a matrix of m-by-n blocks (submatrices), each sized p-by-q. The elements of the (j,k)th block all h...

3 years 前

加载更多