已解决


BULLSEYE Part 2: Reference Problem 18 BULLSEYE
Given n (always odd), return output a that has concentric rings of the 1s and 0s around the center point. Examples: Input ...

28 days 前

已解决


Toeplitz Matrix
For a given square matrix of order n-by-n check whether this is a Toeplitz matrix or not. Return true if it is.

28 days 前

已解决


ZigZag matrix with reflected format
ZigZag MATRIX with REFLECTED format. We have only input x. We have to create a matrix in the following pattern. input n=5...

28 days 前

已解决


Numbers spiral diagonals (Part 2)
Inspired by Project Euler n°28 and 58. A n x n spiral matrix is obtained by starting with the number 1 and moving to the right ...

28 days 前

已解决


Numbers spiral diagonals (Part 1)
Inspired by Project Euler n°28 et 58. A n x n spiral matrix is obtained by starting with the number 1 and moving to the right...

28 days 前

已解决


Recurring Cycle Length (Inspired by Project Euler Problem 26)
Preface: This problem is inspired by Project Euler Problem 26 and uses text from that question to explain what a recurring cycle...

28 days 前

已解决


Project Euler: Problem 18, Maximum path sum I
By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top to bott...

28 days 前

已解决


Longest Collatz Sequence
Inspired by Projet Euler n°14. The Collatz iterative sequence (See Cody problem n° 2103 and 211) is defined for the set of po...

28 days 前

已解决


Divisors for big integer
Inspired by Problem 1025 and Project Euler 12. Given n, return the number y of integers that divide N. For example, with ...

28 days 前

已解决


Highly divisible triangular number (inspired by Project Euler 12)
Triangular numbers can be calculated by the sum from 1 to n. For example, the first 10 triangular numbers are: 1, 3, 6, 10, ...

1 month 前

已解决


Project Euler: Problem 11, Largest product in a grid
What is the greatest product of k adjacent numbers in the same direction (up, down, left, right, or diagonally) in a n×n grid ? ...

1 month 前

已解决


Sums of cubes and squares of sums
Given the positive integers 1:n, can you: 1. Compute twice the sum of the cubes of those numbers. 2. Subtract the square...

1 month 前

已解决


Sum of big primes without primes
Inspired by Project Euler n°10 (I am quite obviously a fan). With problem n°250 by Doug, you can find some global methods to co...

1 month 前

已解决


Infinite precision division
Develop a function that will divide a very very large integer numerator, supplied to function as a string (e.g., '12233344445555...

1 month 前

已解决


How to multiply?
Imagine you are in 3012 Anno Domini, when everyone must learn how to multiply, and competing for the highly prestigious post of...

1 month 前

已解决


How to subtract?
*&plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn* * Imagine you need to subtract one...

1 month 前

已解决


It's going down. We're finding simbers!
This problem is inspired by Project Euler 520: Simbers. "We define a simber to be a positive integer in which any odd digit, ...

1 month 前

已解决


Large Sum (inspired by Project Euler 13)
Your function will be provided an arbitrary number of numbers of arbitrary sizes as a cell array of strings. Some numbers will b...

1 month 前

已解决


Project Euler: Problem 16, Sums of Digits of Powers of Two
2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 2^N? Thanks ...

1 month 前

已解决


How to add?
* Imagine you are in 2222 Anno Domini, when everyone must learn how to add, * and competing for the highly prestigious post of,...

1 month 前

已解决


Given two arrays, find the maximum overlap
Given two (integer) arrays s1 and s2, create a new array s3 which is as short as possible and contains both arrays. #1 s1 = [...

1 month 前

已解决


Counting in Finnish
Sort a vector of single digit whole numbers alphabetically by their name, in Finnish. See the Wikipedia page for <http://en.wik...

1 month 前

已解决


It dseon't mettar waht oedrr the lrettes in a wrod are.
An internet meme from 2003 (read more here) asserted that readers are relatively insensitive to letter order in words, so long a...

1 month 前

已解决


Word Counting and Indexing
You are given a list of strings, each being a list of words divided by spaces. Break the strings into words, then return a maste...

1 month 前

已解决


Find state names that start with the letter N
Given a list of US states, remove all the states that start with the letter N. If s1 = 'Alabama Montana Nebraska Vermont Ne...

1 month 前

已解决


Nearest Numbers
Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

1 month 前

已解决


Remove all the words that end with "ain"
Given the string s1, return the string s2 with the target characters removed. For example, given s1 = 'the main event' your ...

1 month 前

已解决


Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

1 month 前

已解决


De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

1 month 前

已解决


Quote Doubler
Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...

1 month 前

加载更多