Resuelto


Hofstadter G sequence
The Hofstadter G sequence is defined as follows: The first elements of the sequence are 0, 1, 1, 2, 3, 3, 4, 4, 5, 6. Write ...

casi 2 años hace

Resuelto


Hofstadter Female and Male sequences
The Hofstadter Female (F) and Male (M) sequences are defined as follows Write a function to compute for a given n. See http...

casi 2 años hace

Resuelto


Hofstadter H sequence
The Hofstadter H sequence is defined as follows: The first elements of the sequence are 0, 1, 1, 2, 3, 4, 4, 5, 5, 6. Write ...

casi 2 años hace

Resuelto


Hofstadter Q sequence
The Hofstadter Q sequence is defined as follows: The first elements of the sequence are 1, 1, 2, 3, 3, 4, 5, 5, 6, 6. Write ...

casi 2 años hace

Resuelto


Draw a Diamond shape in ones Matrix with '0' s
Input will be odd numbers.The task is to make a Diamond shape in a ones matrix with '0's where the matrix will be a square matri...

casi 2 años hace

Resuelto


Calculate the peak value of square wave
Given the peak value of sine wave, calculate corresponding peak value of square wave, if both have same RMS voltage.

casi 2 años hace

Resuelto


Calculate the integral of the polynomial
for e.g. in = [3 2 1] out = [1 1 1 0]

casi 2 años hace

Resuelto


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

casi 2 años hace

Resuelto


The Ulam Matrix
The Ulam spiral is simple to describe. On a gridded piece of paper, write down the number 1. Then write successive integers as y...

casi 2 años hace

Resuelto


Sum of diagonals
Compute the sum of diagonal elements of a square matrix and store the larger sum to s. Eg : a = [1 2 3; 2 3 4; 4 5 10] ...

casi 2 años hace

Resuelto


Delete the column with all 0 !
Delete the column with all 0 data in a matrix(x). e.g. input x = 1 0 0 4 5 0 7 0 ...

casi 2 años hace

Resuelto


Average of odd values
Find the average of odd values in given a matrix. e.g x=[ 4 11 8 ; 9 2 7 ] y =( 11 + 9+ 7 ) / 3

casi 2 años hace

Resuelto


Create a magic square matrix for a given odd integer
A magic square of size 'N' is a matrix that satisfies the following criterias: # Dimension - NxN # Matrix should contain ALL...

casi 2 años hace

Resuelto


Diagonal Pattern
For a positive integer |n|, return an |nXn| matrix |mat| such that the value of each element in row |i| and column |j| is given ...

casi 2 años hace

Resuelto


Vertical matrix sort
Given a matrix x with n rows and m columns, return a matrix y with 2n rows and m columns, such that every column in x is sorted ...

casi 2 años hace

Resuelto


Basic Operation with the middle number of odd matrix
# Take an odd matrix *like* 3-by-3 # Access the *middle element* of the matrix i.e in case of 3-by-3 matrix the index of the pa...

casi 2 años hace

Resuelto


The maximum sum of squares
Create a function file with an input maxval to determine the maximum number of terms for the series 1^2 + 2^2 + 3^2 + ... such t...

casi 2 años hace

Resuelto


Calculate the area of a circle
Given a circle of diameter x calculate its area

casi 2 años hace

Resuelto


Find the area of ​​the square
There are *n²* circles inscribed in the square ABCD. The perimeter of each circle is *aπ* <<http://imgfz.com/i/3wzCeAT.png>> ...

casi 2 años hace

Resuelto


function to compute root mean square of first nn positive odd integers
Write a function called odd_rms that returns orms, which is the square root of the mean of the squares of the first nn positive ...

casi 2 años hace

Resuelto


Squares of odd numbers upto a given range
Find the squares of odd numbers upto a given range. If Given x=6 return y=(1^2,3^2,5^2) y=1,9,25 If Given x=5 retu...

casi 2 años hace

Resuelto


Get the area of ​​the square.
Four circles are inscribed in the square ABCD. The perimeter of each circle is *aπ*. <<http://imgfz.com/i/UzgCJut.png>> Gi...

casi 2 años hace

Resuelto


Rearrange string
Input is a given string. Output is the number of ways to rearrange the string.

casi 2 años hace

Resuelto


How many ways to write a number
Given two positive numbers n and k, where n>=k. In how many ways can we write n as sum of k positive numbers. Same numbers but d...

casi 2 años hace

Resuelto


odd number odd sum
How many three digit numbers are there whose sum of the digits is odd?

casi 2 años hace

Resuelto


Find the number of rectangles
There is a m*n grade given. Find the number of rectangles in the grid. Remember, a square is also a rectangle.

casi 2 años hace

Resuelto


Do the line-segments intersect?
You are given two line segments. Do they cross? Consider one segment as (x1,y1) to (x2,y2), the other segment as (x3,y3) to (x4...

casi 2 años hace

Resuelto


exactly?
given two strings of numeric expressions such as '1-7/14' and '11/22+0.2^2', return 1 if they are numerically exactly equal othe...

casi 2 años hace

Resuelto


calculate Compound Intrest
Calculate Compound Intrest for given data

casi 2 años hace

Cargar más