A résolu


The Optimal 2D Guillotine Cutting Stock Problem
You are working in a factory that produces rectangular glass sheets. You have a large stock plate of size W x H. Customers have ...

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

4 mois il y a

A résolu


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

4 mois il y a

A résolu


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

4 mois il y a

A résolu


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

4 mois il y a

A résolu


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

4 mois il y a

A résolu


Rotating 2d curve around a vertical axis
Let p be an even-degree polynomial such that has a unique vertex (single global extremum). Consider the counterclockwise rotatio...

4 mois il y a

A résolu


The Generalized N-Jug Water Pouring Problem ( Hard )
Description: You are given N water jugs with maximum capacities specified in a vector C = [ c1, c2, c3,.., c_n]. Initially, all...

4 mois il y a

A résolu


Two Jugs: Minimum Steps ( Medium )
Following the first problem, now you need to find the shortest path. Given two jugs with capacities A and B, find the minimum nu...

4 mois il y a

A résolu


Play Oware with the digits of a number
Oware is a pit and pebble game that consists of two sets of pits or houses filled with pebbles or seeds. During a turn, a player...

4 mois il y a

A résolu


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

4 mois il y a

A résolu


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

4 mois il y a

A résolu


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

4 mois il y a

A résolu


Is it Possible? ( Easy )
In the first part of series, we simplify the problem. Given two jugs with capacities A and B, and a target amount T, determine i...

4 mois il y a

A résolu


Turn year differences into "s score and y years ago"
President Lincoln opened his now-legendary Gettysburg Address with the famous words "Four score and seven years ago...". Given t...

4 mois il y a

A résolu


[Master Regular Expression] String To Integer
Implement the myAtoi(string s) function, which converts a string to a 32-bit signed integer. The algorithm for myAtoi(string s)...

4 mois il y a

A résolu


[Master Regular Expression] String Matching in an Array
Given an array of string words, return all strings in words that are a substring of another word. You can return the answer in a...

4 mois il y a

A résolu


Determine Matrix Dimensions Without Using some built-in MATLAB functions, version 2
Write a function that takes a 2D matrix/1D vector x as input and returns a row vector containing the number of rows and the numb...

4 mois il y a

A résolu


Determine Matrix Dimensions Without Using some built-in MATLAB functions
Write a function that takes a 2D matrix/1D vector x as input and returns a row vector containing the number of rows and the numb...

4 mois il y a

A résolu


Determine Matrix Dimensions Without Using size or length
Write a function that takes a matrix A as input and returns a row vector containing the number of rows and the number of columns...

4 mois il y a

A résolu


Compute the Euclidean Distance Between Two N-Dimensional Vectors
Write a function that computes the Euclidean distance between two N-dimensional vectors. Given two input vectors x and z of equ...

4 mois il y a

A résolu


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

4 mois il y a

A résolu


Sum all elements of a vector or matrix without using some built in functions
Write a function that computes the sum of all elements of the input array v without using the following built-in function: sum,...

4 mois il y a

A résolu


Sum all elements of a vector or matrix without using sum()
Write a function that computes the sum of all elements of the input array v without using the built-in sum function. The input ...

4 mois il y a

A résolu


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.

4 mois il y a

A résolu


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

4 mois il y a

A résolu


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)

4 mois il y a

A résolu


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

4 mois il y a

A résolu


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

4 mois il y a

Charger plus