Solved

Find the palindrome
Given the string a, find the longest palindromic sub-string b. So when a = 'xkayakyy'; you should return b = 'kayak';

6 months ago

Solved

Converting binary to decimals
Convert binary to decimals. Example: 010111 = 23. 110000 = 48.

6 months ago

Solved

Given an unsigned integer x, find the largest y by rearranging the bits in x
Given an unsigned integer x, find the largest y by rearranging the bits in x. Example: Input x = 10 Output y is 12 ...

6 months ago

Solved

Find out sum and carry of Binary adder
Find out sum and carry of a binary adder if previous carry is given with two bits (x and y) for addition. Examples Previo...

6 months ago

Solved

Convert given decimal number to binary number.
Convert given decimal number to binary number. Example x=10, then answer must be 1010.

6 months ago

Solved

Making change
Given an amount of currency, return a vector of this form: [100 50 20 10 5 2 1 0.5 0.25 0.1 0.05 0.01] Example: Input a = ...

6 months ago

Solved

Duplicates
Write a function that accepts a cell array of strings and returns another cell array of strings *with only the duplicates* retai...

6 months ago

Solved

Generate this matrix
For a given odd integer n, generate a matrix as follows: Input: n = 5; Output: [ 2 1 0 0 0 1 ...

6 months ago

Solved

ZigZag matrix with reflected format
ZigZag MATRIX with REFLECTED format. We have only input x. We have to create a matrix in the following pattern. input n=5...

6 months ago

Solved

Is A the inverse of B?
Given a matrix A and a matrix B, is A the inverse of B? >>A=[2,4;3,5]; >>B=[-2.5,2;1.5,-1]; >>isInverse...

6 months ago

Solved

Converts numbers into characters
Converts numbers into characters

6 months ago

Solved

Find the max element of the array
Find the max element of the array

6 months ago

Solved

Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.

6 months ago

Solved

Calculate the average value of the elements in the array
Calculate the average value of the elements in the array

6 months ago

Solved

to the 2 all elements
to the 2 all elements

6 months ago

Solved

the average value of the elements
Calculate the average value of the elements in the array

6 months ago

Solved

calculate the length of matrix
input 1 array, calculate the length

6 months ago

Solved

Draw a '0' in a one matrix!

6 months ago

Solved

Longest run of consecutive numbers
Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you have a = [1 2 2 2 1 ...

6 months ago

Solved

Choose the best fitting dominoes
You will be given a cell array of nx2 matrices. Choose one row from each matrix. These are the ordered pairs that will be plac...

6 months ago

Solved

6 months ago

Solved

サイズが n*2n の "mirror" 行列（対称行列）を作成しましょう。 例: n=2 の場合、以下のような出力を返します。 m = [ 1 2 2 1 1 2 2 1 ] n = 3 の場合、以下のよう...

6 months ago

Solved

6 months ago

Solved

テレビのサイズを求めてみよう
あなたは電気屋で働いています。 あなたの電気屋にテレビを買いに来たお客さんに「何インチのテレビを買いたいのか」と質問したところ、対角線の情報しかわからないと言われてしまいました。 しかし、テレビのインチを知るには、幅と高さの情報が必要です。 ...

6 months ago

Solved

NaN (欠損値) が含まれている行を削除しよう

6 months ago

Solved

ベクトル b にあるスカラ値 a が含まれていれば出力として 1 を返し、含まれていなければ 0 を返すような関数を作成しましょう。 例: a = 3; b = [1,2,4]; スカラ値 3 はベクトル b に含まれていない...

6 months ago

Solved

ゼロでない要素が一番多い行を探そう

6 months ago

Solved

6 months ago

Solved

6 months ago

Solved

ある数のベクトルが与えられた場合、そのベクトルの要素の一つが他の要素の二乗であれば true を返し、それ以外の場合は false を返すようなコードを書いてみましょう。 例: 入力が a = [2 3 4] のとき、 出力 b は t...

6 months ago