Solved

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 months ago

Solved

Project Euler: Problem 5, Smallest multiple

2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smalle...

2 months ago

Solved

Project Euler: Problem 6, Natural numbers, squares and sums.

The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ...

2 months ago

Solved

Project Euler: Problem 7, Nth prime

By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the Nth prime nu...

2 months ago

Solved

Project Euler: Problem 8, Find largest product in a large string of numbers

Find the greatest product of five consecutive digits in an n-digit number. 73167176531330624919225119674426574742355349194934...

2 months ago

Solved

Project Euler: Problem 9, Pythagorean numbers

A Pythagorean triplet is a set of three natural numbers, a b c, for which, a^2 + b^2 = c^2 For example, 3^2 + 4^2 =...

2 months ago

Solved

Project Euler: Problem 10, Sum of Primes

The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below the input, N. Thank you <http:/...

2 months ago

Solved

Project Euler: Problem 1, Multiples of 3 and 5

If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...

2 months ago

Solved

Is the input divisible by 3?

Return true if the input is divisible by 3 and false if not.

2 months ago

Solved

Who Has the Most Change?

You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

2 months ago

Answered

how can i solve this ,can anyone provide me with code? whats wrong with my code ?

function y= valid_date(a,b,c) d31=[1 3 5 7 8 10 12]; d30=[4 6 9 11]; %for leap year if (rem(a,4)==0 && rem(a,100)~=0) || rem...

how can i solve this ,can anyone provide me with code? whats wrong with my code ?

function y= valid_date(a,b,c) d31=[1 3 5 7 8 10 12]; d30=[4 6 9 11]; %for leap year if (rem(a,4)==0 && rem(a,100)~=0) || rem...

7 months ago | 0

Solved

Project Euler: Problem 2, Sum of even Fibonacci

Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te...

7 months ago

Solved

Number of Even Elements in Fibonacci Sequence

Find how many even Fibonacci numbers are available in the first d numbers. Consider the following first 14 numbers 1 1 2...

7 months ago

Solved

Fibonacci-Sum of Squares

Given the Fibonacci sequence defined by the following recursive relation, * F(n) = F(n-1) + F(n-2) * where F(1) = 1 and F(1)...

7 months ago

Solved

cross-section of 3D pyramid

Create 3d pyramid of ones and zeros...where pyramid-part is denoted by ones and outer-part is denoted by zeros..where base is sq...

7 months ago

Solved

Connect Four Win Checker

<http://en.wikipedia.org/wiki/Connect_Four Connect Four> is a game where you try to get four pieces in a row. For this problem, ...

7 months ago

Solved

Construyendo matrices parte 2

Construye la siguiente matriz a partir de otros tres vectores/matrices. [ 1 8 15 3 3 3 3 2 9 16 3 3...

7 months ago

Problem

cross-section of 3D pyramid

Create 3d pyramid of ones and zeros...where pyramid-part is denoted by ones and outer-part is denoted by zeros..where base is sq...

7 months ago | 1 | 12 solvers

Solved

3D pyramid

create a 3D pyramid(x,y,z) of ones(1) and zeros(0)...where pyramid part is denoted by one....nd find the top layer(x,y) of the p...

7 months ago

Problem

Top layer of a 3D pyramid

create a 3D pyramid(x,y,z) of ones(1) and zeros(0)...where pyramid part is denoted by one....nd find the top layer(x,y) of the p...

7 months ago | 1 | 12 solvers

Solved

3D Pyramid

If a pyramid is made with one(1). What will be the height of the pyramid of square shaped base(n*n)? where input is n.

7 months ago

Problem

3D Pyramid

If a pyramid is made with one(1). What will be the height of the pyramid of square shaped base(n*n)? where input is n.

7 months ago | 0 | 14 solvers

Solved

Determine the perimeter of a three-quarter circle

If a circle has a diameter of x as an input value, then show the value of the perimeter of the three-quarter circle in output va...

7 months ago

Solved

Sum the numbers on the main diagonal

Sum the numbers on the main diagonal of an n-by-n matrix. For input: A = [1 2 4 3 6 2 2 4 7]...

7 months ago

Solved

Find the peak 3n+1 sequence value

A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

7 months ago

Solved

Return the 3n+1 sequence for n

A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

7 months ago