Risolto


Sum the main diagonal of a matrix
Given a square matrix, return the sum of its main diagonal elements. Example: diag_sum([1 2 3; 4 5 6; 7 8 9]) returns 15

3 mesi fa

Risolto


Keep Only Even Numbers
Given a vector, return a new vector containing only the even numbers in their original order. Example: keep_evens([1 2 3 4 5 6])...

3 mesi fa

Risolto


Count the vowels in a string
Given a string, return the number of vowels (a, e, i, o, u — case insensitive). Example: count_vowels('Hello World') returns 3

3 mesi fa

Risolto


Count how many elements are above the mean
Given a vector, return the count of elements strictly greater than the mean of the vector. Example: above_mean_count([1 2 3 4 5]...

3 mesi fa

Risolto


Determine if a number is prime
Given a positive integer n, return 1 if it is prime, 0 otherwise. Example: is_prime(7) returns 1, is_prime(4) returns 0

3 mesi fa

Risolto


Electric Power Steering (EPS) Motor Torque with Efficiency
In EPS systems, the motor must generate additional torque to compensate for system losses. Given Required assist torque at rack...

3 mesi fa

Risolto


Electric Power Steering (EPS) Assist Curve Calculation
Electric Power Steering (EPS) provides assist torque proportional to driver input. Given Steering torque Ts and Gain k, Compute...

3 mesi fa

Risolto


EPS Assist Map with respect to the Vehicle Speed
In Electric Power Steering (EPS), assist torque reduces as vehicle speed increases to improve stability at high speeds. Given S...

3 mesi fa

Risolto


Steering 101-Ackermann Steering Ratio
In a turning vehicle, inner and outer wheels follow different radii. Ackermann steering geometry ensures both wheels roll withou...

3 mesi fa

Risolto


Yaw rate of the vehicle
Yaw rate defines how quickly a vehicle rotates about its vertical axis during motion. Given Vehicle speed v and Turning radius ...

3 mesi fa

Risolto


Understeer or Oversteer Gradient Calculation
This gradient determines whether a vehicle tends to understeer or oversteer. Given Mass m, Wheelbase L, Front cornering stiffne...

3 mesi fa

Risolto


Steering Torque Estimation
Steering torque is generated due to lateral tire forces acting through the steering mechanism. Given Lateral force Fy and Lever...

3 mesi fa

Risolto


Tire Slip Angle Calculation
Slip angle represents the angle between the direction a tire is pointing and the direction it is moving. Given Lateral velocity...

3 mesi fa

Risolto


Steering Ratio Calculation
The steering ratio defines the relationship between steering wheel angle and road wheel angle. Given wheel angle δ and Steering...

3 mesi fa

Risolto


Turning radius of a vehicle
The turning radius represents the radius of the circular path followed by a vehicle. Given Wheelbase L and Steering angle δ, Co...

3 mesi fa

Risolto


Double the 2x2 Matrix
In this challenge, you are given a predefined 2x2 matrix called x. Your task is to multiply every element in this matrix by 2 an...

4 mesi fa

Risolto


Legendary NBA Playmaker
Write a function that returns a char array containing the name and surname of a famous NBA player known for his spectacular pass...

4 mesi fa

Risolto


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

5 mesi fa

Risolto


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

5 mesi fa

Risolto


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

5 mesi fa

Risolto


Circular Ring Approximation Mandala
Generate a matrix that approximates a circular ring using distance-based thresholding , a visually rich mandala-inspired challen...

5 mesi fa

Risolto


Vertical Mirror Mandala
Create a symmetric left-right mirrored pattern in an N×N matrix to emulate mandala reflection symmetry. e.g. N = 5; ...

5 mesi fa

Risolto


Concentric Squares Mandala
Generate concentric square rings of alternating 1s and 0s to form a layered mandala-style matrix. e.g. N = 5; 1 1 1 1 1;...

5 mesi fa

Risolto


Hollow Diamond Pattern
Create an N×N matrix that forms a hollow diamond shape using 1s, leaving the interior empty. This challenge emphasizes boundary ...

5 mesi fa

Risolto


Filled Diamond Pattern
Create an N×N binary matrix that forms a filled diamond shape centered in the matrix. The diamond expands symmetrically toward t...

5 mesi fa

Risolto


Number of vowels in string
Write a function that counts how many vowels appear in a given string. Vowels are: a e i o u The function should be case‑insen...

5 mesi fa

Risolto


Sum of even digits
Given a positive integer n, return the sum of all even digits in the number.

5 mesi fa

Risolto


Difference of product and sum
Given a positive integer n, compute the difference between the product of its digits and the sum of its digits.

5 mesi fa

Risolto


Return the product of all elements of a vector or matrix without using built-in functions
Compute the product of all elements of the input array without using the built-in functions prod, ans, or size.

5 mesi fa

Problema


Find the nearest admirable number
Cody Problems 1012 and 2544 ask us to determine whether a number is perfect—that is, whether the sum of divisors is equal to ....

5 mesi fa | 0 | 7 risolutori

Carica altro