Solved

A secret can be told only to 2 persons in 5 minutes. Now these 2 more persons can spread the secret to 4 other people. this way ...

30 dagen ago

Solved

Count digits
Count total number of digits from 1 to n. * n=13 * output=17 since from [1-9] total 9 digits.[10-13] total 4*2=8 digits.

ongeveer een maand ago

Solved

Possible Opponents Matrix for single-elimination tournament
It's tournament time! Given a single-elimination tournament with 2^N competitors, compute the 2^N by 2^N matrix M such that M...

ongeveer een maand ago

Solved

String count
given a string 'str', count the number of the followings - * letters * digits * white space * capital letters * smal...

ongeveer een maand ago

Solved

Checkmate-02
This is an extension of the problem <https://www.mathworks.com/matlabcentral/cody/problems/45238-checkmate> If the king is in...

ongeveer een maand 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...

ongeveer een maand 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 ...

ongeveer een maand 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: ...

ongeveer een maand ago

Solved

Checkmate
* The positions of different chess pieces are given in a cell *p* . * The position of the king is given as *x* Determine i...

ongeveer een maand ago

Solved

Question 1
Implement a function named q1 with one input argument named n. This function should return the multiplication of all odd numbers...

ongeveer een maand ago

Solved

Can the knight take out the pawn?
* position of knight = k * position of pawns = p can the knight take out those pawns? * k='Nf4' * p={'g6','g7'} then...

ongeveer een maand ago

Solved

Queen's move - 02
In continuation with the problem-45236 ... In the previous problem, it was assumed that there were no other chess pieces on th...

ongeveer een maand ago

Solved

Queen's move
given a number of consecutive moves of queen, check for their validity based on their previous position.... but remember if u g...

ongeveer een maand ago

Solved

generate the matrix
given 3 inputs e.g [2,3,4] -- generate a matrix like below -- [2 2 0 0 0 0 0 0 0; 2 2 0 0 0 0 0 0 0; 0 0 3 3 3 0 0 0 0; 0 0...

ongeveer een maand ago

Solved

Calculating large fibonacci numbers
The fibonacci sequence starts 1,1,2,3,5,8... Find the the n'th fibonacci number. Then calculate round(log10( . )) of that n't...

ongeveer een maand ago

Solved

TEST1A
TEST1A

ongeveer 2 maanden ago

Solved

Generate Golomb's sequence
Generate Golomb's sequence upto the given number. if n=4, then seq=1, 2, 2, 3, 3, 4, 4, 4. if n=6, then seq=1, 2, 2, 3, 3, 4, 4,...

ongeveer 2 maanden ago

Solved

Circumcircle Points
Determine the radius of the minimum sized circle that encompasses all the points. Per <http://www.inf.ethz.ch/personal/gaertn...

ongeveer 2 maanden ago

Solved

Remove duplicated triangles
Input T is a triangulation (triplet list of indices -positive integers-, each index refering to a vertex number in a correspondi...

ongeveer 2 maanden ago

Solved

Bell Triangle
Form the bell triangle upto nth bell number posotion; if n=5, then y= [1 0 0 0 0; 1 2 0 0 ...

ongeveer 2 maanden ago

Solved

Count the Number of Undirected Cycles in a Graph
Given a symmetric adjacency matrix, determine the number of unique *undirected* cycles. For example, the graph represented by...

ongeveer 2 maanden ago

Solved

Add two numbers for beginners only

ongeveer 2 maanden ago

Solved

magic solver
Create a function that returns _true_ and has a cody <http://www.mathworks.com/matlabcentral/cody/problems/256-return-the-size-o...

ongeveer 2 maanden ago

Solved

The goal of this problem is the same as the goal of the rest of them: *become the leader*. Actually, you can only solve this ...

ongeveer 2 maanden ago

Solved

generate the matrix
given a value n (say 4) - generate the matrix like below; y= [0 1 2 3 4; -1 0 1 2 3; ...

ongeveer 2 maanden ago

Solved

cofactor matrix
given a matrix, find its cofactor matrix https://en.wikipedia.org/wiki/Minor_(linear_algebra)#Inverse_of_a_matrix

ongeveer 2 maanden ago

Solved

Find triangles from edge
First input is T, a Triplet list of indices -whom each row actually contains the three indices of a triangle vertices-. size(T) ...

ongeveer 2 maanden ago

Solved

wythoff sequence
find the lower wythoff sequence upto n; https://oeis.org/A000201

ongeveer 2 maanden ago

Solved