A résolu


Word with Highest Frequency
Write a MATLAB function that takes in a string and returns the word with the highest frequency in the string. The function shoul...

9 mois il y a

A résolu


Convert row and column subscripts to linear indices
Convert 2D row and column subscripts to linear indices WITHOUT sub2ind Example: row = [1 2 3 1]; col = [2 2 2 3]; sz = [3 3]...

9 mois il y a

A résolu


Matrix spiral
Make a spiral in a (n*n) matrix. The spiral has to start in the top left, and has to rotate clockwise to the center. The spiral ...

9 mois il y a

A résolu


Word Distance - Sum
Let's suppose that the distance of a word can be calculated by summing the differences between its letters, having assigned the ...

10 mois il y a

A résolu


Finding valleys
You have a vector of altitudes (units are arbitrary) and need to find the depths of all the valleys. You also need to determine ...

10 mois il y a

A résolu


Calculate the volume of the intersection of two balls
Consider two balls (solid spheres) in , with radius and respectively. Suppose that the distance between the centers of the two...

10 mois il y a

A résolu


Sign of IEEE Single
Output the sign bit of the IEEE representation of the single-typed 32-bit float input as the uint8 "1" or the uint8 "0".

10 mois il y a

A résolu


Minimum number of crossings in a complete bipartite graph
This problem is related to problem 58389. A complete bipartite graph may be drawn in different ways, such that the number of li...

11 mois il y a

A résolu


Determine whether a number is prome
In discussing the unique factorization of numbers in Elementary Number Theory, Underwood Dudley devised a new number system: “C...

11 mois il y a

A résolu


Draw '5' in Chinese.
Draw a x-by-x matrix '五' using 1s and 0s. Example: x=5 ans= [1 1 1 1 1 0 1 0 0 0 1 1 1 1 0 0 1 0 1 0 1 1 1 1 1] x=7...

11 mois il y a

A résolu


Create an empty array
Suppose you need an empty array. e = [] will give you one, but it's a double array, which may not help if you need a differen...

11 mois il y a

A résolu


Find the circle inscribed in a triangle
Write a function that takes the x- and y-coordinates of three points describing the vertices of a triangle and returns the cente...

11 mois il y a

A résolu


Continuous NaNs - I
Remove any continuous NaNs that appear in the array - %Example 1 input = [1 NaN 2 NaN NaN 3 NaN NaN NaN] output = [1 NaN 2 ...

11 mois il y a

Problème


Continuous NaNs - I
Remove any continuous NaNs that appear in the array - %Example 1 input = [1 NaN 2 NaN NaN 3 NaN NaN NaN] output = [1 NaN 2 ...

11 mois il y a | 0 | 8 solveurs

A résolu


Find circular arc length, sector area and segment area
Given a circular arc passing through the points P = [ x1 y1 ] and Q = [ x2 y2 ] such that the center angle of the arc (in degree...

12 mois il y a

A résolu


Generate a Parasitic Number
This problem is the next step up from Problem 156. Rather than determining if an input is a parasitic number, you will be asked ...

12 mois il y a

A résolu


Sequence Vectorization - II
This is the second part to the question - Sequence Vectorization - I Given an array of Natural numbers, N, return the sequence ...

12 mois il y a

A résolu


Easy Sequences 110: Integration of the Sum of a Recursive Trigonometric Function
A trigonometric function, , is defined as follows: , in radians Applying recursively we define another funct...

12 mois il y a

A résolu


Easy Sequences 109: Summation of Derivatives of a Trigonometric Function
A trigonometric function, , is defined as follows: where: ; and ...

presqu'un an il y a

A résolu


Determine the minimum number of swaps to sort a vector
Cody Problem 1401 asks us to sort a vector with the bubble sort algorithm and count the number of swaps needed. For example, to ...

presqu'un an il y a

A résolu


Flag a convertible string
If a string is able to be entirely converted to an integer, return a "true" flag. Otherwise, return a false flag. For example: ...

environ un an il y a

A résolu


007: Chinese Barrack Invasion
*MISSION:* Successfully invade a military barrack located in China. *WARNING:* There is a row of _n_ security switches protec...

environ un an il y a

A résolu


Solve an ODE: separable equation
Solve the following ordinary differential equation: with the initial condition .The test suite will ask for the value of the ...

environ un an il y a

A résolu


Determine the Zeckendorf expansion of a number

environ un an il y a

A résolu


MatCAT - Reconstruct X from Its X-rays
Consider a matrix x x = [ 1 2 0 0 5 0 3 0 8 ] If we sum x along the rows we get row_sums = [3 5 11] ...

environ un an il y a

A résolu


Easy Sequences 104: One-line Code Challenge - GCDs of Sum of Consecutive Cubes
For a natural number, n, the function CC(n) is defined as follows: In other words, CC(n) is the sum of cubes ...

environ un an il y a

A résolu


Easy Sequences 105: One-line Code Challenge - IPv4 Address Validation
The Internet Protocol version 4 (IPv4) is the dominant protocol for routing devices over the internet. IPv4 addresses are usuall...

environ un an il y a

A résolu


Harmonic series counting
The function takes a positive limit as input, And counts how many terms must be summed in the harmonic series: 1/1, 1/2, 1/3, ...

environ un an il y a

Problème


Sequence Vectorization - II
This is the second part to the question - Sequence Vectorization - I Given an array of Natural numbers, N, return the sequence ...

environ un an il y a | 2 | 5 solveurs

A résolu


Sequence Vectorization - I
Given a Natural number N, return the sequence - [1 1 2 1 2 3 1 2 3 4 ... 1 2 3 ... N-3 N-2 N-1 N] i.e. the concatenation of (1:k...

environ un an il y a

Charger plus