Community Profile

Jiahang Li

849 2018 年以降の合計貢献数

Information and computing science student in China. I started playing Cody on 27th February 2018. MATLAB is my favorite tool in learning.

Jiahang Li's バッジ

Mean number of letters per word (Easy)
Given a character array, s, representing a sentence, return a, the arithmetic mean of the number of letters per word in the give...

4ヶ月 前

Easy problem
This is an easy problem. Just click on submit.

4ヶ月 前

Reverse the Matrix
Given a Matrix A, reverse it. Such that, last element of A becomes 1st and vice versa. for example: Input = [1 2 3;4 5 ...

5ヶ月 前

Instead you ask her to multiply her age by 10, then subtract any of the first nine multiples of 9 (9,18,...,81), and tell you th...

5ヶ月 前

Testing Problem Creation
This is where MATLAB based question will be

5ヶ月 前

Number Power
Raise a number to itself.

5ヶ月 前

Solve The Equation
The coefficients of a system of equations are given in two vectors, x1 and x2. Write a function to solve the equation and return...

7ヶ月 前

Add 2 numbers e.g a=1; b=1 c=a+b;

7ヶ月 前

Return all matrix elements except elements on diagonal
Consider a given Matrix A=[a b c; d e f; g h i] then return a row vector T such that it contains all the El...

8ヶ月 前

Project Euler: Problem 4, Palindromic numbers
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 ...

9ヶ月 前

Project Euler: Problem 3, Largest prime factor
The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number being input, input might be ui...

9ヶ月 前

Get the combinations
Consider p,q = 2 vectors of same or different length. Get a Output Array which has all the possible combinations of Elements o...

9ヶ月 前

Transpose the Matrix
Transpose the given matrix, e.g. x=[a b;c d] transpose of x = [a c;b d]

9ヶ月 前

Find the Pattern
Find the pattern between input and output. Write a function that gives the correct output for any input. *Hint: magic*

10ヶ月 前

Pass the Threshold!!
Write a Matlab function that will take as input a matrix of arbitrary dimensions and a scalar threshold value, and return a vec...

10ヶ月 前

Find argmax of a function
You are given vectors x and y (=f(x)). Return the element of x for which f(x) is maximized.

10ヶ月 前

The Google Interview: Two Eggs Problem
Consider the following problem, a popular Google interview question: A firm has invented a super-strong egg. For publicity pu...

11ヶ月 前

Product of Each Column
Given a matrix |mat| with |n| columns, return a row vector |v| of length |n|, where every element in |v| is the product of the |...

11ヶ月 前

Find if a given sentence is a palindrome
Given a string/character array, return true if the string is a palindrome else returns false. For example: sample_text =...

11ヶ月 前

find the logic,easy one
find the logic behind, example x=18 y=306 x=53 y=2756

11ヶ月 前

Remove the air bubbles from a vector
_*A reduced version of Problem 112*_ Given a column vector v, return a vector w in which all the zeros have "bubbled" to the ...

11ヶ月 前

Funny problems
Generate the following vector： if n=1 then q=1; elseif n=2 then q=[2 2 1]; elseif n=3 then q=[3 3 3 2 2 1]; ... end

11ヶ月 前

Bleed non-zeros to the right
What a title! Yet, it says what I mean. You get a vector, some values and a lot of zeroes. Every zero is replaced by the firs...

11ヶ月 前

Angle between Two Vectors
The dot product relationship, a dot b = | a | | b | cos(theta), can be used to determine the acute angle between vector a and ve...

11ヶ月 前

cross in array
Make a cross from "1" in odd size array. Other value from array should be equal to "0"; As input you get length of side of arra...

11ヶ月 前

Feeling lucky?
Guess which number Cody is thinking (1 to 10)? (This is a game of luck more than skill. Good luck!)

11ヶ月 前

Sum of series VII
What is the sum of the following sequence: Σ(km^k)/(k+m)! for k=1...n for different n and m?

11ヶ月 前

convert the number to binary format & count digits
Convert the given number to the corresponding binary format and count the number of digits in that binary number

11ヶ月 前

Perimeter of a semicircle
Given the diameter d, find the perimeter of a semicircle

11ヶ月 前

Percentage of zeros in a matrix of only 1s and 0s
Write a function called _zero_stat_ that takes a matrix as an input that only has 0 and 1 elements. The function needs to comput...

11ヶ月 前