Gelöst


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

2 Monate vor

Gelöst


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

2 Monate vor

Gelöst


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

2 Monate vor

Gelöst


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

2 Monate vor

Gelöst


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

2 Monate vor

Gelöst


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

2 Monate vor

Gelöst


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

2 Monate vor

Gelöst


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

2 Monate vor

Gelöst


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

2 Monate vor

Gelöst


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

2 Monate vor

Gelöst


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

2 Monate vor

Gelöst


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

2 Monate vor

Gelöst


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

2 Monate vor

Gelöst


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

2 Monate vor

Gelöst


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

2 Monate vor

Gelöst


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

2 Monate vor

Gelöst


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

2 Monate vor

Gelöst


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

2 Monate vor

Gelöst


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

2 Monate vor

Gelöst


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

2 Monate vor

Gelöst


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

2 Monate vor

Gelöst


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

2 Monate vor

Gelöst


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

2 Monate vor

Gelöst


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

2 Monate vor

Gelöst


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

2 Monate vor

Gelöst


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

2 Monate vor

Gelöst


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

2 Monate vor

Gelöst


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

2 Monate vor

Gelöst


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

2 Monate vor

Gelöst


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

2 Monate vor

Mehr laden