A résolu


Leaderboard Tracker
S is an m×n matrix of scores, where S(i,j) is the score of player j in match i. cumScore is an m×1 vector containing the cumula...

9 mois il y a

A résolu


Back to basics 18 - justification
Covering some basic topics I haven't seen elsewhere on Cody. Given a string with extra spaces in front and/or in back, return...

9 mois il y a

A résolu


MATCH THE STRINGS (2 CHAR) very easy
Match the given string based on first two characters on each string. For example A='harsa'; b='harish'; result '1' ...

9 mois il y a

A résolu


Least common multiple of many numbers
1:6 -> 60

9 mois il y a

A résolu


Implement a bubble sort technique and output the number of swaps required
A bubble sort technique compares adjacent items and swaps them if they are in the wrong order. This is done recursively until al...

9 mois il y a

A résolu


Count the peaceful queens
In a 5x5 chessboard with a queen of one color (white, say) on the perimeter, one can place 12 black queens on the board such tha...

9 mois il y a

A résolu


Counting Money
Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: $99,999.99. E...

9 mois il y a

A résolu


Deriving a function using the difference quotient
Write a function that evaluates the derivative of a function in a given point using the well-know formula of the difference quot...

9 mois il y a

A résolu


calculate PI without using pi function
There are many methods to get the pi(Ratio of circumference to diameter). You should get pi without using the pi function in M...

9 mois il y a

A résolu


Euler–Mascheroni constant
Approximate the Euler-Mascheroni constant using the series representation gamma_n=\sum_{k=1}^{n} [1/k-ln(1+1/k)] Calculat...

9 mois il y a

A résolu


Nth roots of unity
First, find the n nth roots of unity. eg if n = 6, find the n distinct (complex) numbers such that n^6 = 1. <https://en.wiki...

9 mois il y a

A résolu


Evaluating a polynomial
Given the following polynomial and the value for x, determine y. y = 3x^5 – x^3 + 8x – 3 Example x = 1 y = 3 - 1 +...

9 mois il y a

A résolu


Polar Form Complex Number Entry
Write a function that takes the magnitude and angle(in degrees) of a complex number and returns a complex variable. Positive ang...

9 mois il y a

A résolu


Strange Number Algorithms
Three integer numbers will be provided to you. Write a function to Step1: Multiply first number by 3. Step2: Add 6 with t...

9 mois il y a

A résolu


Consecutive Powers
Return 2 numbers and 2 powers such that their difference is 1 A 4 element row vector is expected: x where x(1)^x(2) - x(...

9 mois il y a

A résolu


NCHOOSEK - Time Optimization
Input V —— Set of all choices, a vector of N, 1 < N < 100 K —— Number of selected choices, a scalar, 0 <= K <= N Output C ——...

9 mois il y a

A résolu


How to calculate the length of a triangle's side given two angles and one side
You are given a triangle with angles alpha, beta and gamma and sides a opposite alpha, b opposite beta and c opposite gamma. ...

9 mois il y a

A résolu


Minimum possible M of the maximum side of a triangle of given area A.
Suppose a triangle has area A. Suppose it has three sides S1, S2, and S3. Suppose M = max([S1 S2 S3]). What is the minimum po...

9 mois il y a

A résolu


Can the given sides form a triangle?
Can the three given sides form a triangle?

9 mois il y a

A résolu


Create a square matrix of zeros of even order
Create a square matrix of zeros of even order

10 mois il y a

A résolu


Determine if a row vector has NaN
Determine if a row vector x has NaN

10 mois il y a

A résolu


Speed of car
Calculate the Speed of car given its Distance travelled and time taken in x and y respectively

10 mois il y a

A résolu


Replace 0 indices in array with 1's
Take a incoming vector, and replace 0's with ones

10 mois il y a

A résolu


Simple Vector Addition
Take two incoming vectors and output the sum of the two vectors

10 mois il y a

A résolu


Select primes from the matrix.
Select primes from the matrix.

10 mois il y a

A résolu


Find sum of negative elements in row.
Find sum of negative elements in row. Example x=[1 -5 3 4 -6 6 7 8 9 10] result = -11

10 mois il y a

A résolu


Convert binary numbers array into array of decimal numbers.
Convert binary numbers array into array of decimal numbers. Example x=[ 11001000 ; 11001001 ; 11001010 ; 11001011 ; 11001100 ;...

10 mois il y a

A résolu


Number of Circles in a Number
Given a number, return the number of closed 'circles' in the base 10 numerical representation. Note: the number 4 has no circ...

10 mois il y a

A résolu


Pattern matching
Given a matrix, m-by-n, find all the rows that have the same "increase, decrease, or stay same" pattern going across the columns...

10 mois il y a

A résolu


Armstrong Number
Determine whether the given input n-digit number is Armstrong Number or not. Return True if it is an Armstrong Number. An n-Dig...

10 mois il y a

Charger plus