Resuelto


The Ultimate Water Challenge ( Expert )
Description: In the previous problems, you were given a target T and asked to find the minimum number of steps to reach it. ...

3 meses hace

Resuelto


Robust Huffman Decoding: The Single-Bit Error Challenge
In the world of data compression, Huffman coding is a classic algorithm. However, it is notoriously fragile: a single bit error ...

3 meses hace

Resuelto


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 meses hace

Resuelto


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

4 meses hace

Resuelto


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

4 meses hace

Resuelto


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 meses hace

Resuelto


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

4 meses hace

Resuelto


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 meses hace

Resuelto


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 meses hace

Resuelto


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 meses hace

Resuelto


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

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

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

4 meses hace

Resuelto


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 meses hace

Resuelto


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 meses hace

Resuelto


[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 meses hace

Resuelto


[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 meses hace

Resuelto


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 meses hace

Resuelto


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 meses hace

Resuelto


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 meses hace

Resuelto


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 meses hace

Resuelto


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 meses hace

Resuelto


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 meses hace

Resuelto


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 meses hace

Resuelto


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

4 meses 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)

4 meses hace

Cargar más