Solved


Chicken Race
2 chickens, Pete and Fred, compete in a 100 meter race. Pete runs at a velocity of vp meter/second and Fred is slower, running ...

6 years ago

Solved


time difference
The arrays x and y contain time values in the form of: x = [hours minutes seconds] Create the output z which contains the...

6 years ago

Solved


Second smallest number
What is the second smallest number in x? example: x = [1 2 3 4 5 6 7 8 9] y = 2

6 years ago

Solved


Count the numbers
In a array x, count the number of times the number n appears in x. for example: x = [1 2 3 4 3 2 1 2] and n = 2 the answer sh...

6 years ago

Solved


Binary Inversion
Given the unsigned 8-bit integer x, return the number y which is the binary inversion of x. For example if x is 5, y should b...

6 years ago

Solved


Check capital letters
Check if each first letter of a string is a capital letter. for example: 'This Is Ok' gives a true answer and 'This Is not Ok' ...

6 years ago

Solved


Odd times 3
Given a input matrix x, multiply all odd values by 3. Even values remain the same. example: x = [1 2 3 4 5;... 6 7...

6 years ago

Solved


Multiply Column
Given two input, one matrix and one scalar number For example A is a matrix given A = [ 1 2 2 5 2 5 2 3 4 6...

6 years ago

Solved


Zero Cross
Write a function that counts the number of times n a signal x changes sign. Examples x = [1 2 -3 -4 5 6 -7 8 -9 10 11] ...

6 years ago

Solved


Calculate the Number of Sign Changes in a Row Vector (No Element Is Zero)
For a row vector: V=[7 1 2 -3] there is one sign change (from 2 to -3). So, the function you write must return N=1. F...

6 years ago

Solved


Angle difference between Hour Hand and Minute Hand of clock
*Calculate the difference of angles between Hour hand and Minute hand of clock* E.g. 1) At 12:00 Angle Difference = 0 deg...

6 years ago

Solved


Clock Hand Angle 1
Given a time in HH:MM:SS, find the smallest angle (in degrees) between the hour and minute hand

6 years ago

Solved


Angles of the hands of a clock
For this problem, consider an analog (or at least continuous digital representation) of a clock. Our clock is a 12 hour clock w...

6 years ago

Solved


Takuzu row
Takuzu row is one row in a logic puzzle of a rectangular grid. The rules are as follows: (1) The row is filled with 1s and 0s...

6 years ago

Solved


Get a Fibonacci number's index.
*N.B.* For the purpose of this exercise, the first Fibonacci number is 1, and the second is 2; that is, |fib(1) = 1| and |fib(2)...

6 years ago

Solved


Multiplication
Multiply two numbers in a different manner. The numbers are given to you as vectors x and y. Example x = [ 1 2 0 1 ] ...

6 years ago

Solved


factorial
calculate x!

6 years ago

Solved


Can you reshape the matrix?
Given a matrix A, is it possible to reshape it into another matrix with the given number of rows?

6 years ago

Solved


Double Factorial
Return double factorial n(n-2)...(5)(3)(1), n>0, odd n!! = n(n-2)...(6)(4)(2), n>0, even 1 ...

6 years ago

Solved


hanoi towers II
with 3 rods (1,2 & 3), the goal is to move a tower of n disks from rod #1 to rod #3. You can move disks only one by one, on the...

6 years ago

Solved


The Tower of Hanoi
In the <http://en.wikipedia.org/wiki/Tower_of_Hanoi Tower of Hanoi problem> with 3 rods (1, 2 & 3), the goal is to move a tower ...

6 years ago

Solved


Determine whether a given point is inside or outside a polygon
A closed polygon may be described by an N x 2 array of nodes, where the last node and the first node are the same. Each row of ...

6 years ago

Solved


Is It a Snake?
Given an m-by-n matrix, return true if the elements of the matrix are a connected "snake" shape from 1 to m*n. Otherwise return ...

6 years ago

Solved


Replace pattern 0 1 0 and 1 0 1
Find and replace a pattern in a row of zeroes and ones. * Find 1 0 1 and replace it with 1 1 1 * Find 0 1 0 and replace it w...

6 years ago

Solved


Distances in a circle
A circle (360°) is given and a row of 6 monotonic increasing numbers with the which difference from last to first value is les...

6 years ago

Solved


Perimeter of a square!
Calculate the circumference of the square whose side is n

6 years ago

Solved


Triangle???
Calculate the circumference of an equilateral triangle with x

6 years ago

Solved


Sum sum!!!
Sum the numbers from 1 to n

6 years ago

Solved


Sum Sum Sum!
Calculate the sum of the natural numbers from 1 to n

6 years ago

Solved


Radiation Heat Transfer — View Factors (5)
View factors (aka configuration factors) are utilized in some radiation heat transfer models to estimate heat transfer rates bet...

6 years ago

Load more