解決済み


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

2年弱 前

解決済み


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

2年弱 前

解決済み


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

2年弱 前

解決済み


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

2年弱 前

解決済み


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

2年弱 前

解決済み


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.

2年弱 前

解決済み


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

2年弱 前

解決済み


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年弱 前

解決済み


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

2年弱 前

解決済み


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

2年弱 前

解決済み


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

2年弱 前

解決済み


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

2年弱 前

解決済み


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

2年弱 前

解決済み


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

2年弱 前

解決済み


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

2年弱 前

解決済み


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

2年弱 前

解決済み


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

2年弱 前

解決済み


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

2年弱 前

解決済み


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

2年弱 前

解決済み


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

2年弱 前

解決済み


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

2年弱 前

解決済み


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

2年弱 前

解決済み


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

2年弱 前

解決済み


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

2年弱 前

解決済み


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

2年弱 前

解決済み


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.

2年弱 前

解決済み


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

2年弱 前

解決済み


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

2年弱 前

解決済み


calculate Compound Intrest
Calculate Compound Intrest for given data

2年弱 前

さらに読み込む