Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


Calculate the Surface Area of an Ellipsoid

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


Find the nearest value to the given one

mehr als 3 Jahre vor

Gelöst


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] ) == [...

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


Center of Mass(es) in 3D Space

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


Convert any case sentence to Title Case

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Mehr laden