Solved


Chain multiplication - 01
Say, you are given two matrices - A (shape= 3*4) and B(shape = 4*5). If you multiply these two matrices, the resultant matrix w...

3 years ago

Solved


Castling-03
Given the position of different chess pieces on the chessboard, figure out whether castling is valid or not in the next move (wh...

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

3 years ago

Solved


Roman numbers: how old is that building?
The front of old buildings sometimes show the year when they were built in roman numbers. These number are rather confusing and ...

3 years ago

Solved


Find the moving-average of the elements of a vector
Example Input vector: [1 2 3 4] output vector: 1st element=1/1, 2nd element=(1+2)/2, 3rd element=(1+2+3)/3, 4th element=(1+2...

3 years ago

Solved


compter le nombre de zéros dans une matrice
écrire une fonction count_zeros qui prend en entrée une matrice M et détermine le nombre de zéros dans une matrice

3 years ago

Solved


sinus de pulsation a
Ecrire une fonction sinat qui prend en entrée un vecteur t (de valeurs croissantes) et renvoie un vecteur y de de même dimensi...

3 years ago

Solved


Find the worst traffic yesterday
A traffic monitoring system records traffic density for the highway in front of the MathWorks headquarters using a raspberry pi ...

3 years ago

Solved


Find the remainder - 01
Given an array of integers, find the remainder when the product of all the elements is divided by N

3 years ago

Solved


Find the remainder - 02
Given an array of integers, find the remainder when the summation of all the elements is divided by N

3 years ago

Solved


Area under the curve
Compute area under the curve specified by points stored in y, where y is in range (0,inf) and x time step is 1. note: please r...

3 years ago

Solved


Determine whether one vector is a subset of another
While bumbling through a pair of problems in the Number Theory group, I wrote code to determine whether a vector is a subset of ...

3 years ago

Solved


Sort Except Zeros
Sort the numbers in a vector. But the position of zeros should not be changed. Example: sort_except_zeros( [5 3 0 0 2 4] ) == [...

3 years ago

Solved


Circular Segment Area
Let us consider a circle with radius . If we draw an angle (in radians) from the center of the circle, the two radii forming th...

3 years ago

Solved


Congruent
Given two numbers, check whether they are congruent to each other or not for a particular value N.

3 years ago

Solved


Partial pivoting for Gauss Elimination
Write a function to implement partial pivoting for Gauss elimination, given the pivot element.

3 years ago

Solved


Round2 Three Times Fight!
Your function should round the numbers then multyply them by 2 then repeat them three times

3 years ago

Solved


Double Fibonacci
double_fibonacci takes two integers, each greater than one, as input arguments (it does not have to check the format of the inpu...

3 years ago

Solved


Return longest string in 1-D array of strings
Find the longest string in an array of strings. Return an empty string if the initial array is empty. If there are multiple stri...

3 years ago

Solved


Center of Mass(es) in 3D Space

3 years ago

Solved


Travelling Salesman Problem (TSP)
Find a short way through given points. This is the travelling salesman problem. But the solution should be a fast and small func...

3 years ago

Solved


Caesar Cipher Shift
Given a word and its encrypted version using the caesar cipher, find the shift used.

3 years ago

Solved


Sort Non-zeros
Consider 0s in a vector creates a break-point. sort all the sub-arrays created by those break points. For example, a = [3, 4, 1...

3 years ago

Solved


Sort vector by number of prime factors of each element
Sort a given array based on how many prime factors each term has. Sort from least to greatest and output original values. Ex: ...

3 years ago

Solved


Convert Cylindrical Cooridinates into Spherical Coordinate
For Cylindrical coordinate point, rho, fie (degrees) and z. Convert these points in Spherical Cooridinate System and save result...

3 years ago

Load more