Feeds
已解决
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...
2 days 前
已解决
Built-out FFTShift
The task in hand is to replicate the built-in function - fftshift (with single input), but without using the function. However,...
3 days 前
已解决
Find record values in a sequence
Write a function to find the record values in a sequence—that is, the largest values seen since the start. For example, if the s...
14 days 前
已解决
Gather primes
A book titled Gather that I regularly see inspired this game: make as many words as possible from the letters in the word GATHER...
17 days 前
已解决
Sudoku square
We have a small Sudoku square, but one number is missing. x = [ 1 5 4 8 6 3 0 9 7 ] Make a function, wher...
19 days 前
已解决
Gene Duplication with Sequencing Errors
You are investigating the genome of the bacterium Codex matlabius. A virus that infects C. matlabius is known to insert long, re...
22 days 前
已解决
How Long is the Border Between Unitopia and Zerostan?
Two countries, Unitopia (denoted by ones) and Zerostan (denoted by zeros) are engaged in a long-standing dispute: how long is th...
26 days 前
已解决
FEN to Chess Board
Note: This problem is the reverse, or complement, of Problem 61144 - FEN Chess Notation. Given a FEN (Forsyth-Edwards Notation)...
26 days 前
已解决
Two Sum
Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You m...
27 days 前
已解决
Container With Most Water
You are given an integer array height . There are vertical lines drawn such that the two endpoints of the ith line are (i, 1) an...
28 days 前
已解决
Does the coin touch the line?
If we throw a coin that has a diameter of d, its center will land in a grid n x m. What is the probability that the coin land...
28 days 前
已解决
Convert a diagonal representation of a matrix element to linear index or subscripts
Elements in matrices in MATLAB can be retrieved by linear index or subscripts. For example, the 1 in the matrix below has a line...
1 month 前
已解决
Determine whether a number is a repfigit number
A sequence of numbers is constructed from a number with the following steps: List the digits of . Compute the ()st term as t...
1 month 前
已解决
Extract numbers using a decaying sieve
The Sieve of Eratosthenes is one method of determining primes. Starting with 2, one keeps 2 and removes 2x2, 3x2, 4x2, etc. Then...
1 month 前
已解决
Find the Nth number in the 7-sequence
Find the Nth number in the 7-sequence. 7, 14, 21, 28, 35, 42, 49, 56, 63, 77, 84, ... Hint: Refer test suites
1 month 前
已解决
The Bridges of Nedsburg
The fabled city of Nedsburg consists of several islands connected by bridges. Due to tectonic forces, shoddy civil engineering, ...
1 month 前
已解决
FEN Chess Notation
Given an 8-by-8 character matrix representing a chess board, convert it to FEN (Forsyth-Edwards Notation) board position format....
1 month 前
已解决
Can I make a right triangle ?
Input(a) - is vector with any amount of values. Interpreted as legths of sides. Output(b): * Is true if there are any 3 va...
2 months 前
已解决
Apply the planing transform to natural numbers
Claude Lenormand’s planing (or raboter, in French) transform removes one element from each run in a sequence; that is, imagine a...
2 months 前
已解决
Half-Swap
Given a vector with an even number of elements, rearrange it so that the elements in its first half are switched with those i...
2 months 前
已解决
Return the Square of a Number
Write a function that takes a single numeric input x and returns its square. That is, given x, your function should output x^2....
2 months 前
已解决
Find the smallest prime with n inside
Consider the sequence that begins 101, 113, 127, 131, 149, 151, 163,... Not only is every term prime, the th term is the smalles...
2 months 前
已解决
Express base-10 integers in lazy binary
The binary (or base-2) representations of a number n can be constructed as follows: Step 1: If n = 0, then the binary represent...
2 months 前
已解决
Find Solutions to Edge-Matching Puzzles
I was intrigued by some edge-matching puzzles I came across when visiting my parents over Thanksgiving. "An edge-matching puzzle...
2 months 前
已解决
How tall will my cactus be?
My Barbed Wire Cactus is a desert cactus that relies on just the right amount of rainfall to stay healthy. Given a 1×12 vector...
2 months 前
已解决
Slicing the area of a regular polygon
Given the area, A, of a regular polygon with n sides, each of length s, consider its decomposition in congruent isosceles triang...
2 months 前
已解决
Covering rectangle area of a four-pointed star polygon
Given the four-pointed star polygon formed by the rectangle, with dimensions l1xl2, and four triangles, with height, h, from the...
3 months 前
已解决
Height of a four-pointed star polygon
Given the area A, of a rectangle with dimensions l1xl2, where the side lengths are integers and form the smallest possible perim...
3 months 前
已解决
Popular Word Game™ Distance
Professor Ned, who holds the Nedowed Chair of Crackpot Mathematics at the University of Nedsburg, has recently discovered the da...
3 months 前
已解决
Compute MOSFET oxide thickness
Calculate the oxide thickness in nanometers for an NMOS on a p-type substrate. Inputs (all scalars): NA — acceptor concentrat...
3 months 前











