Solved


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 månader ago

Solved


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 månader ago

Solved


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 månader ago

Solved


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 månader ago

Solved


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 månader ago

Solved


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 månader ago

Solved


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 månader ago

Solved


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 månader ago

Solved


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 månader ago

Solved


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 månader ago

Solved


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 månader ago

Solved


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 månader ago

Solved


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 månader ago

Problem


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 månader ago | 0 | 8 solvers

Solved


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 månader ago

Solved


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 månader ago

Solved


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 månader ago

Solved


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

ungefär ett år ago

Solved


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

ungefär ett år ago

Solved


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

ungefär ett år ago

Solved


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

ungefär ett år ago

Solved


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

ungefär ett år ago

Solved


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

ungefär ett år ago

Solved


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

ungefär ett år ago

Solved


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

ungefär ett år ago

Solved


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

ungefär ett år ago

Solved


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

ungefär ett år ago

Problem


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

ungefär ett år ago | 2 | 5 solvers

Solved


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

ungefär ett år ago

Load more