Solved


Roll the Dice!
*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

7 years ago

Solved


Is this matrix orthogonal?
Given a square matrix, a, determine whether it is orthogonal. INPUT: a, a n x n matrix OUTPUT: true or false

7 years ago

Solved


Who am I ?
Who am I ? Write any function that reveals itself under these constraints. Hint: I am combinatorial code, and I don't like stat...

7 years ago

Solved


give-nth-decimal-place-of-pi up to 100 digits
max 100th place after the decimal point this is upgrade problem of 142

7 years ago

Solved


Find out phase angle of second order system.
Find out the phase angle of a second order system. In a control system, the phase angle is given by the inverse of cos.

7 years ago

Solved


chance in percent for minimum K heads when a good coin is tossed N times?
For example, chance is 100% for minimum 0 heads when a coin is tossed 7 times. Chance is 50% for minimum 2 heads when a coin is...

7 years ago

Solved


Number of paths on a 3d grid
This problem is inspired by <https://www.mathworks.com/matlabcentral/cody/problems/1483-number-of-paths-on-a-grid>, which you mi...

7 years ago

Solved


Greed is good - Simple partition P[n].
Find a simple partition P[n]. E.g. P[10] = 4 + 3 + 2 + 1. # There are many solutions, compute just one set. # Don't repeat ...

7 years ago

Solved


Numbers at bit-boundary
Find if a number is on or below the bit-boundary, as defined below. Examples 7,9 straddle the bit-boundary at 2^3 as do 31...

7 years ago

Solved


2048 Next Move
Given a board in the game 2048 (see the game here: <http://gabrielecirulli.github.io/2048/ 2048>) and a direction ('up','down','...

7 years ago

Solved


Minefield Sonar
*Background* In mine-hunting games (e.g. Microsoft Minesweeper), the user is provided with a covered grid that, upon a left c...

7 years ago

Solved


Code breaker, Part III: Operation Xiangliu
You have been tasked with decoding several batches of coded messages that have been intercepted. Based on previous intellig...

7 years ago

Solved


Cell Operator *
Please implement operator * for cell: >> {2,3} * 2 ans = 1×4 cell array [2] [3] [2] [3] >> {2,3} * [2 3]...

7 years ago

Solved


Find Pseudo-Cyclic Number
A cyclic number is an integer in which cyclic permutations of the digits are successive multiples of the number https://en.wikip...

7 years ago

Solved


Numbers on 7-segment
This is a 7-segment: _ |_| |_| It's a 3-by-3 char matrix.It has made by 3 characters: '_' , '|' and ' ' (space...

7 years ago

Solved


Find 1's Complement
Find 1's complement of a binary number For Example: x = 10011010 1's complement of x = 01100101

7 years ago

Solved


Compute Hamming distances between each pair of rows from two input matrices
For two input matrices _u_ ( _n_ x _uCols_ ) and _v_ ( _n_ x _vCols_ ) of numbers in range [0..255] (8-bit), such that each colu...

7 years ago

Solved


Compute hamming distance between two binary vectors represented using lists of 1-byte numbers
Let v and u be vectors of the same size with 8-bit integers (0-255). We want to compute the number of bits where those vectors d...

7 years ago

Solved


weekday and month
Given a year and a weekday, determine how many months of that year had five of those weekdays. It is kind of easy to find. Ex...

7 years ago

Solved


Check if vertices form a rectangle
Given a set of 4 vertices defined by vectors X and Y, return true if the vertices form a rectangle and false otherwise. X and...

7 years ago

Solved


Is 3D point set Co-Planar?
This Challenge is to determine if four 3D integer points are co-planar. Given a 4x3 matrix representing four x,y,z integer poin...

7 years ago

Solved


Distance of the centroids of the balls
Given *n* balls of radius *r* and the vector *p (nx3)* with all position *(x,y,z)* of the balls, return the symmetric matrix *A ...

7 years ago

Solved


Find S-parameters of the circuit
Refer to <http://en.wikipedia.org/wiki/Scattering_parameters> for the information about the system of scattering parameters. ...

7 years ago

Solved


Grid traversal
Given a line defined by (x1,y1) & (x2,y2),return the number of squares that the line crosses on the grid (a square is 1x1). ...

7 years ago

Solved


Draw 'H'
Draw a x-by-x matrix 'H' using 1 and 0. (x is odd and bigger than 2) Example: x=5 ans= [1 0 0 0 1 1 0 0 0 1 ...

7 years ago

Solved


Draw 'E'
Draw a x-by-x matrix 'E' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 1 1 0 0 0 0 ...

7 years ago

Solved


Draw 'F'
Draw a x-by-x matrix 'F' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 1 1 0 0 0 0 ...

7 years ago

Solved


Calculate time taken by light to reach earth surface
We know the time(seconds) taken by light to reach surface of earth. What if the distance varies yearly or source of light moves ...

7 years ago

Solved


Which way to go?
Given an m*n grid, How many ways are there to go from upper left corner to the lower right one? You can only move right...

7 years ago

Solved


Number of paths on a grid
Consider a grid formed by n vertices vertically down, and m vertices horizontally right. Your starting point is at the top lef...

7 years ago

Load more