Solved


Determine the winner of a goofy golf tournament
My brother and father were playing golf one day, and they caught up to a group that was part of a tournament. The group members ...

2 years ago

Solved


Luhn's Algorithm
Luhn's Algorithm is used as a checksum for credit card numbers or similar identifiers. It can detect single-digit changes and sw...

2 years ago

Solved


Vector slither sort!
Sort a numeric vector in the following format: [largest value, smallest value, second largest value, second smallest value, etc...

2 years ago

Solved


Sum of 2 numbers in array
Given an array and a target sum, return true if any 2 numbers in the array sum up to the given target sum. Both numbers cannot h...

2 years ago

Solved


Return the middle element of an NxN square matrix where N is odd
Let's say you are given an NxN square matrix where N is always going to be an odd number: x = [ 1 2 3 4 5 6 7 8 ...

2 years ago

Solved


apply zero padding to a matrix

2 years ago

Solved


Check if a year is a leap year or not
Return 1 if a given year is a leap year or 0 if it is not

2 years ago

Solved


Draw a fancy '7' in a zero matrix!
Given a x-by-x matrix filled with zeros (x is odd and > 3). Use 7s to draw a number 7 into it! Like this: x = 5, y = 7 7 7 7 7...

2 years ago

Solved


Parsing Expressions - Binary Arithmetic Operators I
Parse and evaluate expressions like these: '1 + 2' '51 - 78' '42 * 9' The only operators are +, -, *. Both argu...

2 years ago

Solved


Find the nth composite number.
Everyone heard about the nth prime number. Let's try to find out the nth composite. For example , 1 is the first composite, 10 i...

2 years ago

Solved


Right shift an array n times with constant space.
Right shift an array n times with constant space, that is, no extra array can be used. Right shift operation: Last element com...

2 years ago

Solved


MinMax mapping
Given a matrix, map all the elements within a given interval. For example, a=[ 2 5 10] mapped in the interval [1,2] ...

2 years ago

Solved


Dominant Matrix - 01
A matrix is said to be diagonally dominant if for every row of the matrix, the magnitude of the diagonal entry in a row is large...

2 years ago

Solved


Cancel Middle
Write a function called cancel_middle that takes A, an n-by-m matrix, as an input where both n and m are odd numbers an...

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

2 years ago

Solved


Make the first letter of a sentence Capital.
In this problem you will be given a string of 2 or 3 lines. Your work is to make the first letters of every line Capital. You wi...

2 years ago

Solved


Minimum Maximum Sort Array
sort one array by put minimum value followed by maximum as follow a=[2 3 1 5] and the solution is y=[1 5 2 3 3 2 5 1];

2 years ago

Solved


Euclidean inter-point distance matrix
The Euclidean distance between two points in a p-dimensional space is a really common thing to compute in the field of computati...

2 years ago

Solved


¿Es una función exponencial?
Crea una función que permita analizar si los datos dados por el usuario ( *x* e *y*) se relacionan por medio de una función expo...

2 years ago

Solved


Determine connected components of a graph
Adjacency matrix of an undirected graph is given. Return the number of connected components in the graph.

2 years ago

Solved


Absolute Value of the Product of Complex Numbers
Find the absolute value (modulus) of the product of two complex numbers given by a + bi and c + di.

2 years ago

Solved


Bleed non-zeros to the right using REGEXP, and that sort of cheatcodess...
This one is quite similar to <http://www.mathworks.nl/matlabcentral/cody/problems/1998-bleed-non-zeros-to-the-right>. But thi...

2 years ago

Solved


Conta Consoantes
Dada uma string A, retorne a quantidade de consoantes de A; ContaConsoantes('Hello World') = 7;

2 years ago

Solved


Calculo das raizes com Bhaskara
Dado três valores a, b e c. Calcule as raizes da equação ax² + bx + c = 0 * para raizes reais, deve ser arrendondado em 2 casas...

2 years ago

Solved


Juros Compostos
Faça uma função que receba um capital inicial (C), uma taxa de juros a ser aplicada (i) e um tempo (t) para qual será aplicado o...

2 years ago

Solved


Sequence
Let S be a sequence of numbers Let Find for some , where and . Update - test suite cleaned up on 2-9-22

2 years ago

Load more