Resuelto


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

2 meses hace

Resuelto


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

2 meses hace

Resuelto


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

2 meses hace

Resuelto


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

2 meses hace

Resuelto


Triangle Area Using Heron's Formula
Given the three side lengths a, b, and c of a triangle, calculate its area using Heron's formula and round to 4 decimal places. ...

2 meses hace

Resuelto


[Master Regular Expression] Reformat Phone Number
You are given a phone number as a string number. number consists of digits, spaces ' ', and/or dashes '-'. You would like to re...

2 meses hace

Resuelto


[Master Regular Expression] Goat Latin
You are given a string sentence that consist of words separated by spaces. Each word consists of lowercase and uppercase letters...

2 meses hace

Resuelto


[Master Regular Expression] Vowel-Consonant Score
You are given a string s consisting of lowercase English letters, spaces, and digits. Let v be the number of vowels in s and c ...

2 meses hace

Resuelto


[Master Regular Expression] Unique Email Addresses
Every valid email consists of a local name and a domain name, separated by the '@' sign. Besides lowercase letters, the email ma...

2 meses hace

Resuelto


[Master Regular Expression] Strong Password Checker II
A password is said to be strong if it satisfies all the following criteria: It has at least 8 characters. It contains at l...

2 meses hace

Resuelto


Multiply the input by five
Create a function that takes an input x and returns an output y that is five times larger.

2 meses hace

Resuelto


Robust Main Diagonal Sum with Special Value Handling in Arrays
Compute the sum of the diagonal elements of an array (vector or matrix). If array is not square return the char array: 'no-squa...

2 meses hace

Resuelto


[Master Regular Expression] Validate IP Address
Given a string queryIP, return "IPv4" if IP is a valid IPv4 address, "IPv6" if IP is a valid IPv6 address or "Neither" if IP is ...

2 meses hace

Resuelto


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

2 meses hace

Resuelto


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

2 meses hace

Resuelto


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

2 meses hace

Resuelto


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

2 meses hace

Resuelto


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

2 meses hace

Resuelto


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

2 meses hace

Resuelto


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

2 meses hace

Resuelto


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

2 meses hace

Resuelto


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

2 meses hace

Resuelto


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

2 meses hace

Resuelto


Upper vs Lower Triangle
Create an n × n matrix A such that: Elements strictly above the main diagonal are 1 Elements strictly below the main diagonal ...

2 meses hace

Resuelto


Center-of-Mass Index of a Vector
Given a numeric vector x, treat each element x(i) as a mass located at index i. Compute the center-of-mass index idx = sum(i *...

2 meses hace

Resuelto


First Unique Character
Given a character vector s, return the first character that appears exactly once in s. If every character repeats at least once...

2 meses hace

Resuelto


Odd Run Sums
Given a row vector x of integers, find every maximal run of consecutive odd numbers and return a row vector containing the sum o...

2 meses hace

Resuelto


Mirror Pair Mean
Given a row or column vector v, create a vector y of the same size where each element is replaced by the average of itself and i...

2 meses hace

Resuelto


The Singularity - Event Horizon (Absolute Zero)
Inspired by Problem61291 Mô tả: Bầy đàn gồm M agents phải di chuyển xuyên qua không gian 5D Hyper-Torus ( kích thước mỗi chiều...

2 meses hace

Resuelto


Robust Corner Product with Special Value Handling in Arrays
Compute the product of the corner elements of an array (vector or matrix). If any corner element is NaN, return NaN. If any co...

2 meses hace

Cargar más