Solved


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...

8 years ago

Solved


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...

8 years ago

Solved


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...

8 years ago

Solved


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 ...

8 years ago

Solved


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...

8 years ago

Solved


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 ...

8 years ago

Solved


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]

8 years ago

Solved


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

8 years ago

Solved


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...

8 years ago

Solved


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 ...

8 years ago

Solved


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...

8 years ago

Solved


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

8 years ago

Solved


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...

8 years ago

Solved


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...

8 years ago

Solved


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...

8 years ago

Solved


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 ...

8 years ago

Solved


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 ?...

8 years ago

Solved


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...

8 years ago

Solved


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...

8 years ago

Solved


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

8 years ago

Solved


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

8 years ago

Solved


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...

8 years ago

Solved


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...

8 years ago

Solved


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...

8 years ago

Solved


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...

8 years ago

Solved


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

8 years ago

Solved


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...

8 years ago

Solved


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 ...

8 years ago

Solved


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

8 years ago

Solved


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:...

8 years ago

Load more