Community Profile

photo

Doan Quang Manh


322 total contributions since 2019

Doan Quang Manh's Badges

  • Leader
  • Cody Problems in Japanese Master
  • Draw Letters
  • Introduction to MATLAB Master
  • Community Group Solver
  • Commenter
  • Promoter
  • CUP Challenge Master
  • Solver

View details...

Contributions in
View by

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

environ 6 heures ago

Solved


Scoring for oriented dominoes
Given a list of ordered pairs, and the order they should be placed in a line, find the sum of the absolute values of the differe...

environ 15 heures ago

Solved


Interpolator
You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...

environ 16 heures ago

Solved


Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

1 jour ago

Solved


Summation of array
Given an array, Find the sum of all of the elements in it Examples: Input x = [1 2 3 5; 4 5 6 7]; Output y is 33

1 jour ago

Solved


Pangrams!
A pangram, or holoalphabetic sentence, is a sentence using every letter of the alphabet at least once. Example: Input s ...

1 jour ago

Solved


How to subtract?
*&plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn* * Imagine you need to subtract one...

2 jours ago

Solved


Find the alphabetic word product
If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ....

2 jours ago

Solved


subtract central cross
Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.

2 jours ago

Solved


Matrix multiplication across rows
Given matrix m, return matrix n such that, rows of n are result of multiplication of the rows of the input matrix Example ...

2 jours ago

Solved


Remove entire row and column in the matrix containing the input values
Remove the entire row and column from the matrix containing specific values. The specified value can be a scalar or a vector. Fo...

2 jours ago

Solved


Write a function man that takes a row vector v and returns a matrix H as follows..
Write a function called man that takes a row vector v as an input and returns a matrix H whose first column consist of the eleme...

2 jours ago

Solved


frame of the matrix
Given the matrix M, return M without the external frame.

2 jours ago

Solved


Given a 4x4 matrix, swap the two middle columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...

2 jours ago

Solved


Calendar Matrix
Return a calendar matrix for the given values of month and year. Assume that Sunday is the first day of the week. The resulting ...

4 jours ago

Solved


Generate this matrix
Generate the following matrix. n = 2; out = [-4 -3 -2 -1 0 -3 -2 -1 0 1 -...

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

4 jours ago

Solved


Fill a zeros matrix
The aim is to fill an array of all zeros given a numerical value and the index of row and columns for this value. 3 Inputs: ...

4 jours ago

Solved


Getting the indices from a matrice
Getting the indices from a matrice. Inspired by Problem 645. Getting the indices from a vector by the great Doug Hull. Given a...

4 jours ago

Solved


Is this is a Tic Tac Toe X Win?
For the game of <https://en.wikipedia.org/wiki/Tic-tac-toe Tic Tac Toe> we will be storing the state of the game in a matrix M. ...

4 jours ago

Solved


easy problem
Find the last element of the array

4 jours ago

Solved


Given a vector x, return vector y with all negative elements from the vector x.
Given a vector x, return vector y with all negative elements from the vector x if x has negative elements. Otherwise return 0. ...

4 jours ago

Solved


Give prime Numbers upto n
You are given a input number x; print all the prime numbers less than equal to x.

6 jours ago

Solved


middleAsColumn: Return all but first and last element as a column vector
Given input A, return all but the first and last elements, arranged as a column vector. (I.e., all dimensions after the first s...

6 jours ago

Solved


Bit calculation
Give me the count of numbers from 1 to n having their last two bits as 0. For example function y = ret_count(4) y = x...

6 jours ago

Solved


Mysterious digits operation (easy)
What is this digit operation? 0 -> 0 1 -> 9 121 -> 9 44 -> 6 15 -> 5 1243 -> 7 ...

6 jours ago

Solved


Target sorting
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

6 jours ago

Solved


Times 3 problem
When you enter the number, it should return the number multiplied by 3

8 jours ago

Solved


Find out value of sine given by degree.
Find out value of sine given by degree. If theta=30, it's value must be 0.5.

8 jours ago

Load more