A résolu


Find argmax of a function
You are given vectors x and y (=f(x)). Return the element of x for which f(x) is maximized.

presque 8 ans il y a

A résolu


Seperate array to small section according to its index position
Given a integer n, we can generate a sequence [0,1,2,3,4,..., 2^n-1], then we separate it to two sequence according to their ind...

presque 8 ans il y a

Problème


Seperate array to small section according to its index position
Given a integer n, we can generate a sequence [0,1,2,3,4,..., 2^n-1], then we separate it to two sequence according to their ind...

presque 8 ans il y a | 4 | 22 solveurs

A résolu


Nodal Voltage of Resistor Ladder Network
* You have a bunch (an even number N) of identical resistors (each R ohms), a good battery (V volts) and a high impedance voltme...

presque 8 ans il y a

A résolu


Sherlock Holmes: The Spy Problem
A guest at a party is a spy if this person is not known by any other guest, but knows all of them. There is at most one spy at a...

presque 8 ans il y a

A résolu


Toads and Frogs Puzzle
On a one-dimensional board with n + m + 1 cells, there are n counters in the first n cells representing Toads and m counters in ...

presque 8 ans il y a

A résolu


007: Chinese Barrack Invasion
*MISSION:* Successfully invade a military barrack located in China. *WARNING:* There is a row of _n_ security switches protec...

presque 8 ans il y a

A résolu


Sort Reversal
There are n index cards in a row, with n distinct integers written on them (one number per card) so that the numbers are sorted ...

presque 8 ans il y a

A résolu


The Google Interview: Two Eggs Problem
Consider the following problem, a popular Google interview question: A firm has invented a super-strong egg. For publicity pu...

presque 8 ans il y a

A résolu


Five Fingers
A little girl has just learnt how to count from 1 to N using the five fingers of her left hand as follows. She starts by calling...

presque 8 ans il y a

A résolu


Writing Error Messages
Well written functions check inputs to make sure the input is valid. The function ErrorCheck takes three arguments: * a - a s...

presque 8 ans il y a

A résolu


Zigzag of square matrix
find zigzag of square matrix in one dimension array a=[1 2 3;4 5 6;7 8 9]; should return b= [1 2 4 7 5 3 6 8 9]

presque 8 ans il y a

A résolu


Expand 10^n to Powers of 4
Given an integer n, return the coefficients c = [c_n,c_n-1,...,c_0] Such that 10^n = c_n*4^(n) + c_n-1*4^(n-1...

presque 8 ans il y a

A résolu


The Deadly Sin
Melvyn and Banner are fighting over chocolates. Melvyn has X chocolates, while Banner has Y. Whoever has a lesser number of choc...

presque 8 ans il y a

A résolu


Sequential Unconstrained Minimization (SUMT) using Exterior Penalty
Write a function to find the values of a design variable vector, _x_, that minimizes a scalar objective function, _f_, given a f...

presque 8 ans il y a

A résolu


Pipeline - Variable-length Input
Design the |gt|(>) method of |function_handle| so that: >> 1 > @sin > @cos ans = 0.666366745392881 >> cos(sin(1...

presque 8 ans il y a

A résolu


Back to basics: adding comments to your code
One of the most useful skills a programmer can develop is the skill — or habit — of writing descriptive comments within/above th...

presque 8 ans il y a

A résolu


How many ways to write
How many ways to write a positive integer x as the sum of n numbers , where , x>n and no n number is less than -2.

presque 8 ans il y a

A résolu


Prouhet–Tarry–Escott (basic)
Inspired by <http://www.mathworks.com/matlabcentral/cody/problems/660-find-a-subset-that-divides-the-vector-into-equal-halves pr...

presque 8 ans il y a

A résolu


Write out numbers in words
Write out numbers in words ( range [0-9999] ) with British spelling rules. For example; * 1 > one * 56 > fifty-six * 100 >...

presque 8 ans il y a

A résolu


Prime Product
My professor has given a sequence of N numbers as a1, a2, ..., aN and asked me to find the smallest possible value of ai * aj su...

presque 8 ans il y a

A résolu


Image Processing 002 : Fix Vignetting in a Visible Sensor
The task is to correct image files for Visible scanning sensors that due to errant tolerancing produce vignetted(V) images. The ...

presque 8 ans il y a

A résolu


USC Spring 2013 ACM: Snow Cones
This Challenge is to solve the <http://contest.usc.edu/index.php/Spring13/Home USC Spring 2013 ACM Contest> Problem F, Snow Cone...

presque 8 ans il y a

A résolu


how many of the entries are positive?
Given x= sin(linspace(0,10*pi,100)), how many of the entries are positive?

presque 8 ans il y a

A résolu


Is it a mail?
Electronic mail, or email, is a method of exchanging digital messages between people using digital devices such as computers, mo...

presque 8 ans il y a

A résolu


Convert nested struct-array to numeric array
Sometimes data happens to be nicely structured in a struct-array, distributed over various levels of the struct, according to th...

presque 8 ans il y a

A résolu


3D indexes
Generalisation in 3 dimensions of the <http://nl.mathworks.com/matlabcentral/cody/problems/43117-2d-indexes Problem 43117. 2D I...

presque 8 ans il y a

A résolu


count upper and lower case characters
In a given input string, count and return the number of upper and lower case characters as u and l respectively. For example:...

presque 8 ans il y a

A résolu


Sum of unique multiples of 3 and 5
If we list all the natural numbers up to 15 that are multiples of 3 or 5, we get 3, 5, 6, 9, 10, 12 and 15. The sum of these mul...

presque 8 ans il y a

A résolu


Leading-zero padding
Write a function that will add leading-zero padding to all numbers in the supplied vector, as necessary, based on the maximum nu...

presque 8 ans il y a

Charger plus