Resuelto


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

3 meses hace

Resuelto


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

3 meses hace

Resuelto


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

3 meses hace

Resuelto


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

3 meses hace

Resuelto


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

3 meses hace

Resuelto


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

3 meses hace

Resuelto


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

3 meses hace

Resuelto


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

3 meses hace

Resuelto


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

3 meses hace

Resuelto


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

3 meses hace

Resuelto


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

3 meses hace

Resuelto


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

3 meses hace

Resuelto


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

3 meses hace

Resuelto


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

3 meses hace

Resuelto


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

3 meses hace

Resuelto


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

3 meses hace

Resuelto


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

3 meses hace

Resuelto


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

3 meses hace

Resuelto


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

3 meses hace

Resuelto


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

3 meses hace

Resuelto


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

3 meses hace

Resuelto


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

3 meses hace

Resuelto


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

3 meses hace

Resuelto


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

3 meses hace

Resuelto


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

3 meses hace

Resuelto


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

3 meses hace

Resuelto


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

3 meses hace

Resuelto


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

3 meses hace

Resuelto


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

3 meses hace

Resuelto


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

3 meses hace

Cargar más