Resuelto


Test for balanced parentheses
Given the input inStr, give the boolean output out indicating whether all the parentheses are balanced. Examples: * If ...

1 día hace

Resuelto


DNA N-Gram Distribution
Given a string s and a number n, find the most frequently occurring n-gram in the string, where the n-grams can begin at any poi...

1 día hace

Resuelto


Clean the List of Names
Given a list of names in a cell array, remove any duplications that result from different capitalizations of the same string. So...

1 día hace

Resuelto


Replace NaNs with the number that appears to its left in the row.
Replace NaNs with the number that appears to its left in the row. If there are more than one consecutive NaNs, they should all ...

1 día hace

Resuelto


Alphabetize by last name
Given a list of names in a cell array, sort the list by the last name. So if list = {'Barney Google','Snuffy Smith','Dagwood ...

1 día hace

Resuelto


The Goldbach Conjecture, Part 2
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

1 día hace

Resuelto


Find the palindrome
Given the string a, find the longest palindromic sub-string b. So when a = 'xkayakyy'; you should return b = 'kayak';

1 día hace

Resuelto


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 día hace

Resuelto


Find the peak 3n+1 sequence value
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

1 día hace

Resuelto


Find the two-word state names
Given a list of states, remove all the states that have two-word names. If s1 = 'Alabama Montana North Carolina Vermont N...

1 día hace

Resuelto


Pattern matching
Given a matrix, m-by-n, find all the rows that have the same "increase, decrease, or stay same" pattern going across the columns...

1 día hace

Resuelto


Scrabble Scores
Given a word, determine its score in <http://en.wikipedia.org/wiki/Scrabble Scrabble>. The input string will always be provi...

1 día hace

Resuelto


Duplicates
Write a function that accepts a cell array of strings and returns another cell array of strings *with only the duplicates* retai...

1 día hace

Resuelto


Maximum running product for a string of numbers
Given a string s representing a list of numbers, find the five consecutive numbers that multiply to form the largest number. Spe...

1 día hace

Resuelto


Find the two most distant points
Given a collection of points, return the indices of the rows that contain the two points most distant from one another. The inpu...

1 día hace

Resuelto


Find relatively common elements in matrix rows
You want to find all elements that exist in greater than 50% of the rows in the matrix. For example, given A = 1 2 3 5 ...

1 día hace

Resuelto


Rotating the plane region bounded by two polynomials
Let p and q be n-degree and m-degree polynomials with n >= m >= 1. Consider clockwise rotate the plane region bounded by these t...

2 días hace

Resuelto


Simulate full-stop emergency braking scenario.
Emergency braking events demand rapid deceleration to bring the vehicle safely to rest. Given initial vehicle speed and constant...

3 días hace

Resuelto


Compute optimal regenerative and friction brake torque blending.
Electric and hybrid vehicles combine regenerative braking with traditional friction braking to maximize energy recovery while en...

3 días hace

Resuelto


Estimate brake disc temperature rise during braking.
During braking, kinetic energy is converted into thermal energy, causing brake discs to heat up. Excessive temperature rise can ...

3 días hace

Resuelto


Compute optimal front–rear brake force distribution.
Modern braking systems dynamically distribute braking forces between front and rear axles to maintain stability, reduce stopping...

3 días hace

Resuelto


Compute wheel slip ratio during braking.
During braking, a difference develops between the vehicle’s forward speed and the rotational speed of its wheels. This differenc...

3 días hace

Resuelto


Estimate dynamic load transfer to front axle during braking.
During braking, load shifts from the rear axle to the front axle. Given mass, deceleration, center of gravity height, and wheelb...

3 días hace

Resuelto


Estimate brake line pressure required for a given force.
Hydraulic braking systems amplify pedal input to generate braking force. Given braking force and piston area, compute the hydrau...

3 días hace

Resuelto


Compute the required brake torque at wheel to stop the car
Brake torque defines how effectively braking force translates into wheel deceleration. Given braking force and wheel radius, det...

3 días hace

Resuelto


Compute braking force using vehicle mass and acceleration.
Compute braking force required to stop a vehicle of mass 'm' and with acceleration 'a' Remember: F = m × a.

3 días hace

Resuelto


Compute vehicle stopping distance using initial speed and constant deceleration.
Given vehicle speed v (m/s) and constant deceleration a (m/s²), compute stopping distance Remember: d = v² / (2a)

3 días hace

Resuelto


Spiral Mandala
Generate a clockwise spiral pattern using 1s in an N×N matrix to create an intricate mandala effect. e.g. N = 5; y_correct...

3 días hace

Resuelto


Starburst Mandala
Create a mandala starburst using diagonal and orthogonal symmetry in a matrix.

3 días hace

Resuelto


Hourglass Mandala
Generate an hourglass shape using matrix geometry and symmetry. e.g. N = 5; 1 1 1 1 1; 0 1 1 1 0; ...

3 días hace

Cargar más