Solved


replace nan values iteratively.
replace nan values with the average of two neighbour non-nan value iteratively as follow; x = [2; 4; 6; nan; nan; nan; 10]; ...

2 years ago

Solved


Ordinary Annuity : Periodic Payments (Future Value)
Theorem : Future Value of an Ordinary Annuity where; F : Future value A : Periodic payment r : Rate per period n : Numbe...

2 years ago

Solved


Cumulative difference
Given an array, return the cumulative difference. Example a = [ 1 3 5 7 ] cumdiff = [ 1 2 1 -2 ]

2 years ago

Solved


Unique: Enhanced Performance - Avoiding Memory Crash
The Challenge is to create the unique array for a long and wide array. Difficulties are that the normal unique(a,'rows') func...

2 years ago

Solved


Usage of java.math : N Choose K with unlimited precision
Calculate the binomial coefficient nchoosek with full accuracy. This challenge may use the wonderful word of java.math that allo...

2 years ago

Solved


Binary Array to Hex Representation
Given a binary array of bytes (lsb to msb), convert it into a hexadecimal representation (msb to lsb). For example: Input: [1 ...

2 years ago

Solved


AES SubBytes() Transformation
Given a 16x2 input character hexadecimal array representing the AES state, execute the AES algorithm SubBytes() transformation a...

2 years ago

Solved


String to Binary Representation
Given a string, convert it using UTF-8 into a binary array where each character or byte is arraigned low to high. For example: ...

2 years ago

Solved


The almost-birthday problem.
This is a harder version of the birthday problem. Now, you will have to determine the probability that two or more people in a r...

2 years ago

Solved


Make a "better" checkerboard matrix
This problem seeks to expand the task in Cody Problem 4 by allowing for the creation of checkerboard matrices that can be rectan...

2 years ago

Solved


Mechanics 1
I thought I would make a mechanics problem for all those physics lovers out there. Imagine two solid, rigid spheres B1 and B...

2 years ago

Solved


How Far Can You Throw Something?
As you probably learned in your high school physics class, throwing an object at a 45 degree angle will give you the maximum ran...

2 years ago

Solved


Bouncing disk
A disk is placed in a rectangular room with dimensions a and b in a point with coordinates x0 and y0. The disk is given a startu...

2 years ago

Solved


Hamming Weight - Fast
The Hamming Weight, <http://en.wikipedia.org/wiki/Hamming_weight wiki Hamming Weight>, in its most simple form is the number of ...

2 years ago

Solved


You LOVES Matlab 41%
Given two strings, determine the percentage that one loves the other in the following way: YOU LOVES MATLAB there is 1 '...

2 years ago

Solved


Fractal: area and perimeter of Koch snowflake
Starting from an equilateral triangle with side 's', what is the area and perimeter of Koch snowflake at n'th recursive iteratio...

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

2 years ago

Solved


Most Frequent Word - 01
Given a document file or a character array, find out the most frequent word in that document. In the case of multiple words -...

2 years ago

Solved


How many days?!?
Christmas is coming earlier and earlier each year. Thanks to rampant commercialism and Christmas Creep, "The Twelve Days of Chr...

2 years ago

Solved


Determine when snow started
R.P. Agnew posed the following problem: It starts snowing in the morning and continues steadily throughout the day. A snowplow t...

2 years ago

Solved


How many Christmas presents under the tree?
For many families at Christmas, each family member gives 1 present to every other family member. The main exception is that chil...

2 years ago

Solved


first step for Huffman Coding (easy)
Given a string, you must sort the characters by occurrence (from lowest to highest). This step is necessary to generate a Huf...

2 years ago

Solved


Array Height (no usage of size)
Find the array height, the number of rows. Size may not be used.

2 years ago

Solved


Sum of Squares
Given a vector v of length n, write a MATLAB function to calculate the sum of the squares of its elements.

2 years ago

Solved


String vowel manipulation
Given a string, find all the vowels and shift them to the end of the string in the same order as they are found.

2 years ago

Solved


Build the Well
Calculate the total time taken for building 'n' wells given : Worker A takes a hr to build the well alone Worker B takes b hr...

2 years ago

Solved


Bag of apples
find probabilty of getting red apples from a bag of 'r' red and 'g' green apples.

2 years ago

Solved


Find the function 2
Given a set of point (x,y) and the coordinate x of a new point, find the y value of new point. Test Suite is based on only one ...

2 years ago

Solved


Would Homer Like It?
Given a matrix of ones and zeros, you must determine if there are any doughnuts present (would Homer Simpson like it?). A doug...

2 years ago

Solved


Find the right number make the equation
Given positive integer number n, find the right positive integer number a, b , so that (1) sqrt(a + n * b) is a positive inte...

2 years ago

Load more