Risolto


Tent matrix
Create an n x n matrix that resembles one kind of tent. The variable n is provided to the function and will be an odd number. As...

4 giorni fa

Risolto


Produce the following matrix
Produce the following matrix x = [2 3 4] y_correct = [1 1/2 1/3; 2 1 1/4; 3 4 1];

4 giorni fa

Risolto


Make a diamond
Given n, odd number > 1, return n by n matrix consist of "null" and "*" characters arranged like a diamond. No toolbox funct...

4 giorni fa

Risolto


create a square matrix
create a [n*n] matrix. example: mat(4)= [ 1 4 9 16 4 4 9 16 9 9 ...

4 giorni fa

Risolto


Make a rainbow matrix (follow-up to checkerboard matrix)
Given an integer n, make an n-by-n matrix as shown below. The a(1,1) should be 0. As we move away from the top-left, the number ...

4 giorni fa

Risolto


Rule of mixtures (composites) - reverse engineering
The <http://en.wikipedia.org/wiki/Rule_of_mixtures rule of mixtures> is used in the mechanical design of composite structures to...

4 giorni fa

Risolto


Rule of mixtures (composites) - other bound
The <http://en.wikipedia.org/wiki/Rule_of_mixtures rule of mixtures> is used in the mechanical design of composite structures to...

4 giorni fa

Risolto


Rule of mixtures (composites) - either bound
The <http://en.wikipedia.org/wiki/Rule_of_mixtures rule of mixtures> is used in the mechanical design of composite structures to...

4 giorni fa

Risolto


Find matching string from a list of strings
Write a function that returns a string that is a unique match (if it exists) of the string inStr from a list of strings strList....

8 giorni fa

Risolto


Prime Ladders
A <http://en.wikipedia.org/wiki/Word_ladder word ladder> transforms one word to another by means of single-letter mutations. So ...

8 giorni fa

Risolto


Sequence Vectorization - I
Given a Natural number N, return the sequence - [1 1 2 1 2 3 1 2 3 4 ... 1 2 3 ... N-3 N-2 N-1 N] i.e. the horizontal concatenat...

8 giorni fa

Risolto


Sequence Vectorization - II
This is the second part to the question - Sequence Vectorization - I Given an array of Natural numbers, N, return the sequence ...

8 giorni fa

Risolto


Local Extrema
Given a 2D (m,n>1) matrix, replace an element if it is not a local extrema (minima/maxima), with 0 (zero). The comparison crite...

8 giorni fa

Risolto


Matrix Rotation
You are given a 2D matrix of dimension [m,n] and a positive integer r. You have to rotate the matrix r times and print the resul...

8 giorni fa

Risolto


List ways to reach a target sum

9 giorni fa

Risolto


Fill a rectangle with 1x1 and 2x2 tiles
A 3x2 rectangle can be filled with 1x1 and 2x2 tiles in three ways: The colors merely distinguish the sizes of the tiles. A 3...

9 giorni fa

Risolto


Count the ways to draw non-intersecting chords between points on a circle
There are 9 ways to draw non-intersecting chords between four points on the perimeter of a circle (including no chords at all). ...

9 giorni fa

Risolto


Compute the bubble popper fidget spinner sequence
A fidget spinner is a toy made of multiple lobes that pivot on a ball bearing. In some, the lobes hold bubble poppers, or rubber...

9 giorni fa

Risolto


Sum the reciprocals of polygonal numbers
As explained in Cody Problem 60571, a polygonal number is the number of dots arranged in the shape of a regular polygon. For exa...

10 giorni fa

Risolto


ICFP2024 002: Lambdaman 9
The ICFP2024 contest was held June29 thru July 1. The contest consisted of five parts: ICFP Language, Lambdaman maze, Starship f...

17 giorni fa

Risolto


ICFP2024 001: Lambdaman 6
The ICFP2024 contest was held June29 thru July 1. The contest consisted of five parts: ICFP Language, Lambdaman maze, Starship f...

17 giorni fa

Risolto


Perimeter of a Koch snowflake
A Koch snowflake is an iteratively generated (fractal) shape built out of successively smaller equilateral triangles by followin...

18 giorni fa

Risolto


List primes of the form xy+z
Consider three consecutive integers , , and . When is the number prime? For example, if or , then the results are 17 and 37, ...

18 giorni fa

Risolto


Find polygonal numbers that are Blum integers
A polygonal number is the number of dots arranged in the shape of a regular polygon. For example, 15 is a triangular number beca...

18 giorni fa

Risolto


Compute the number of squares a knight can reach after n moves
Several Cody problems involve knights from chess. They have asked players to find a knight’s tour in a matrix (CP 96), determine...

29 giorni fa

Risolto


Given a Polyshape_01 (ps) Return its Perimeter, Area, and Centroid.
Return the perimeter (P) of a polyshape object, which is the sum of the lengths of its boundaries. Return the total area (A) of...

29 giorni fa

Risolto


Determine whether a number is a Blum integer
A Blum integer is a semiprime—that is, the product of two distinct primes—whose factors have the form for some integer . The nu...

circa un mese fa

Risolto


Write a MATLAB function that takes a positive integer ( n ) as input and returns the sum of all the even numbers from 1 to ( n ).
Write a MATLAB function that takes a positive integer ( n ) as input and returns the sum of all the even numbers from 1 to ( n )...

circa un mese fa

Carica altro