Community Profile

# daniel lamont

### University of Pittsburgh

218 total contributions since 2012

View details...

Contributions in
View by

Solved

Finding two missing number in 1 to n array
You are given an array of numbers from 1 to n with two missing numbers. Return the two missing numbers. Input: x=[5 2 0 1 ...

presque 4 ans ago

Solved

Knight's Tour Checker
Given a matrix a, determine whether or not a legal <http://en.wikipedia.org/wiki/Knight's_tour knight's tour> is present. The kn...

presque 4 ans ago

Solved

Calculate cosine without cos(x)
Solve cos(x). The use of the function cos() and sin() is not allowed.

presque 4 ans ago

Solved

Calculate sin(x) without sin(x)
Calculate y = sin(x) x = 0 -> y= 0 without the use of sin(x) or cos(x)

presque 4 ans ago

Solved

Remove all the columns contains only zero
Remove the column from the matrix which has only zeros . Refer the Example below a= 1 0 3 0 23 0 56 0 1 ...

presque 4 ans ago

Solved

Bubble sort
Write your own bubble sort function ( <https://en.wikipedia.org/wiki/Bubble_sort>) to sort all elements in x in ascending order....

presque 4 ans ago

Solved

i forgot to use capital I
When referring to yourself you should write "I" (capital) and not "i". So correct the input string x, but be aware that other u...

presque 4 ans ago

Solved

multiply an array by its position number
You have given an array. Multiply an array by its position number

presque 4 ans ago

Solved

Angle difference between Hour Hand and Minute Hand of clock
*Calculate the difference of angles between Hour hand and Minute hand of clock* E.g. 1) At 12:00 Angle Difference = 0 deg...

presque 4 ans ago

Solved

Determine the roots of a quadratic equation., if coefficients a,b and c are given.

presque 4 ans ago

Solved

Find remainder when x is divided by 3
Find remainder when x is divided by 3

presque 4 ans ago

Solved

Vector multiplication
Given two row vectors, v1 and v2, each representing an integer, such that the vector elements are the digits from left to right,...

presque 4 ans ago

Solved

Given two row vectors, v1 and v2, each representing an integer, such that the vector elements are the digits from left to right,...

presque 4 ans ago

Solved

Select every other element of a matrix
Write a function called outMat = odd_idx( myMat ) that takes a matrix, myMat, as input argument and returns a matrix th...

presque 4 ans ago

Solved

Is this number Munchhausen Narcissistic?
In this problem, simply return 1 if a supplied number is Munchhausen narcissistic or 0 if not. Example 153 is narcissistic...

presque 5 ans ago

Solved

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

presque 5 ans ago

Solved

Evil Number
Check if a given natural number is evil or not. Read more at <https://oeis.org/A001969 OEIS>.

presque 5 ans ago

Solved

Smith numbers
Return true if the input is a Smith number in base ten. Otherwise, return false. Read about Smith numbers at <http://en.wikipedi...

presque 5 ans ago

Solved

Find the 9's Complement
Find the 9's complement of the given number. An example of how this works is <http://electrical4u.com/9s-complement-and-10s-c...

presque 5 ans ago

Solved

Compute Fibonacci Number
Compute the _n_-th Fibonacci Number f(0) = 0, f(1) = 1, f(2) = 1, f(3) = 2, ... f(42) = 267914296

presque 5 ans ago

Solved

Sum the squares of numbers from 1 to n
For a given value of n return the sum of square of numbers from 1 to n. Example For n = 2 then sum of squares = 5 (1^2 + ...

presque 5 ans ago

Solved

Kaprekar numbers
Test if the input is a Kaprekar number: <http://mathworld.wolfram.com/KaprekarNumber.html>. Return a logical true or false. ...

presque 5 ans ago

Solved

Parasitic numbers
Test whether the first input x is an n-parasitic number: <http://en.wikipedia.org/wiki/Parasitic_number>. ( _n_ is the second in...

presque 5 ans ago

Solved

Determine if a Given Number is a Triangle Number
*Description:* Determine if the elements of an input array are triangle numbers and return the result as an array with the sa...

presque 5 ans ago

Solved

Create a figure and plot data
Given two data vectors (x,y), open a new figure and plot the data. Return the figure handle.

presque 5 ans ago

Solved

Area of an equilateral triangle
Calculate the area of an equilateral triangle of side x. <<http://upload.wikimedia.org/wikipedia/commons/e/e0/Equilateral-tr...

presque 5 ans ago

Solved

Area of an Isoceles Triangle
An isosceles triangle has equal sides of length x and a base of length y. Find the area, A, of the triangle. <<http://upload...

presque 5 ans ago

Solved

Length of a short side
Calculate the length of the short side, a, of a right-angled triangle with hypotenuse of length c, and other short side of lengt...

presque 5 ans ago

Solved

Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....

presque 5 ans ago

Solved

Is this triangle right-angled?
Given three positive numbers a, b, c, where c is the largest number, return *true* if the triangle with sides a, b and c is righ...

presque 5 ans ago