Risolto


Probabilities - Balls and urns - 01
The urn contains B blue balls and R red balls. Each trial consists of drawing one random ball from the urn and observing its col...

circa 8 anni fa

Risolto


Probabilities - Balls and urns - 02
The urn contains B blue balls and R red balls. Each trial consists of drawing one random ball from the urn and observing its col...

circa 8 anni fa

Risolto


Find the day for a date
Today's day and date will be given to you. By utilising that you need to find the day of the old date. (Date will be in DD/MM/YY...

circa 8 anni fa

Risolto


GJam 2014 China Rd A: Library Sorting (Large)
This Challenge is derived from <http://code.google.com/codejam/contest/2924486/dashboard#s=p2 GJam 2014 China Sorting>. Subset ...

circa 8 anni fa

Risolto


GJam 2014 China Rd A: Library Sorting (Small)
This Challenge is derived from <http://code.google.com/codejam/contest/2924486/dashboard#s=p2 GJam 2014 China Sorting>. This...

circa 8 anni fa

Risolto


Draw a 'Z'.
Given _n_ as input, generate a n-by-n matrix like 'Z' by _0_ and _1_ . Example: n=5 ans= [1 1 1 1 1 0 0 0 1 ...

circa 8 anni fa

Risolto


Prime numbers between a , b.
Find all prime number between a & b (including a and b). example: a=100 b=120 y= [101 103 107 109 113]

circa 8 anni fa

Risolto


The twelve days of Christmas
Traditionally there are twelve days of Christmas to celebrate ("Twelvetide"), typically starting with Christmas Day (25 December...

circa 8 anni fa

Risolto


Percentage profit:6: Cumulative Interest
If a bank is giving r% yearly cumulative interest for deposit, how much money we can get by depositing x amount of money monthly...

circa 8 anni fa

Risolto


Sales Prediction
Miss X is a shopaholic person and every weekend she goes to a mall. There are total of 10 shops. Miss X starts from shop #1 and ...

circa 8 anni fa

Risolto


How long until the weekend?
Write a function a that takes a date vector as an input and returns the number of hours until the weekend begins. The beginning...

circa 8 anni fa

Risolto


surface of parallelogram
Given 2 vectors of each 3 elements, determine the surface of the parallelogram which can be created from these 2 vectors.

circa 8 anni fa

Risolto


Find my birthday
Given a birth date x, find my age when my birth day will fall on the same day as I was born. So if I was born on Monday, what a...

circa 8 anni fa

Risolto


birthday on same day of week
Say, Mr. X's birthday is on 20th July, 2014. It was Sunday. Determine the closest year when his birthday will again be on Sunday...

circa 8 anni fa

Risolto


Tax Season ! How much is my salary?
Tax Season! I was employed for a period from x until y in a year and I get pay check of amount z on every alternate Friday of th...

circa 8 anni fa

Risolto


grazing cows
Here is a fun problem I encountered in high school. Two cows are grazing in an enclosed square-shaped field of side length s ...

circa 8 anni fa

Risolto


Try your chance!!!
There is a bomb in 3 cell! You must avoid to select the bomb. choose one of these cells and try your chance: 1 2 3 ?...

circa 8 anni fa

Risolto


Assign matrix rows/columns to separate variables
This is a slight variant of <http://www.mathworks.com/matlabcentral/cody/problems/2668-assign-matrix-elements-to-separate-variab...

circa 8 anni fa

Risolto


Assign matrix elements to separate variables
Given an input array, return each element of the array as a separate variable. If the number of output arguments (k) is less tha...

circa 8 anni fa

Risolto


Expression or variable?
Test if arguments of the function are all variables (workspace variables names). Return 1 if yes, 0 if no. For example : ...

circa 8 anni fa

Risolto


Matrix diagonalization
You will be given Two matrices A and B. Return 1 if B is the diagonal matrix of A, 0 otherwise

circa 8 anni fa

Risolto


Create formatted value string Cell array of a vector
This Challenge is to create a cell array that contains strings of vector components in a given format. c=vector2formattedstri...

circa 8 anni fa

Risolto


Choose group with people
How many ways can you choose n groups of n people from n^2 people, assuming the groups are distinct? The number of people is gi...

circa 8 anni fa

Risolto


Rolling maximums above a threshold
You are given either a vector or a 2-D matrix M and a threshold value of t. Write a script that will calculate how many times t...

circa 8 anni fa

Risolto


Two fractions, one sum
Given a positive number x, write a MATLAB script that will tell you how many ways that the reciprocal of that number can be writ...

circa 8 anni fa

Risolto


Outlier number!
Find a number which has maximum distance from the mean value of vector A. Example: A=[5 2 1 5 6 2 5 9] y=9

circa 8 anni fa

Risolto


Find the inverse permutation
Given a permutation vector perm (a vector of n elements containing all the elements from 1 to n in some order), return the permu...

circa 8 anni fa

Risolto


Split bread like the Pharaohs - Egyptian fractions and greedy algorithm
How would you split 5 loaves of bread among 8 people in all fairness? Get a hint from the Pharaohs. 5/8 = 4/8 + 1/8 , i.e. each ...

circa 8 anni fa

Risolto


'Absolute value'
Create a function called own_abs, which is the absolute number entered as the input return value.

circa 8 anni fa

Risolto


Calculate mean value of any pair in a vector.
Given a vector A, calculate the mean of 2 number in the vector one by one. example: input: A=[1, 5, 6, 8, 9, 15] output:...

circa 8 anni fa

Carica altro