문제를 풀었습니다


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

21일 전

문제를 풀었습니다


How many bottles can you drink?
Sometimes if you buy a drink in a glass bottle you can return that bottle and get some money back. Let's assume we have "x" a...

21일 전

문제를 풀었습니다


Multiply 2 numbers
Very easy, you just have to multiply 2 numbers but you cannot use the following signs (*, /, - ,^) ,mtimes , times, cross, pro...

21일 전

문제를 풀었습니다


Create matrix with Gray code
Output "g" should be a matrix of class double, with <http://en.wikipedia.org/wiki/Gray_code Gray reflected binary code>. Inpu...

21일 전

문제를 풀었습니다


Do you have the minimum age?

22일 전

문제를 풀었습니다


Largest Rectangle Area in a Histogram
Given a histogram represented by an array of integers, e.g., [2, 1, 4, 5, 1, 3, 3] : find the maximum area of a rectangle tha...

22일 전

문제를 풀었습니다


Reverse Integer
You are given an integer, reverse its digits. For negative integers, the sign should remain in the front. For instance, 12340 s...

23일 전

문제를 풀었습니다


Determine if a Digit is Isolated
A digit is considered isolated if both its left and right neighbors are different from itself. For example, in the number 776444...

23일 전

문제를 풀었습니다


Absolute Sorting
Given an array with various numbers, your have to sort it by absolute value in ascending order. For example, for the array [-2...

23일 전

문제를 풀었습니다


Counting the occurrences of a digit in a book
The printer has printed a book with 'p' pages. How many times did they use the character 'd'? In other words, how many times doe...

23일 전

문제를 풀었습니다


Spreadsheet Column Number
Spreadsheet uses an alphabetic naming system for columns, starting with 'A', 'B', 'C', etc. The column names continue like 'AB',...

23일 전

문제를 풀었습니다


Perfect shuffle
We call "perfect shuffle" the process of cutting a deck of cards into two equal halves, and then perfectly interleaving them: on...

23일 전

문제를 풀었습니다


Find the nearest value to the given one

23일 전

문제를 풀었습니다


Count digits
Count total number of digits from 1 to n. * n=13 * output=17 since from [1-9] total 9 digits.[10-13] total 4*2=8 digits.

25일 전

문제를 풀었습니다


chess position
given the position of a chess piece in algebric notation, convert it into 8 by 8 matrix format. For example, * 'Qd5' >> [3,4]...

25일 전

문제를 풀었습니다


Can the knight take out the pawn?
* position of knight = k * position of pawns = p can the knight take out those pawns? * k='Nf4' * p={'g6','g7'} then...

25일 전

문제를 풀었습니다


Castling-03
Given the position of different chess pieces on the chessboard, figure out whether castling is valid or not in the next move (wh...

26일 전

문제를 풀었습니다


Castling-02
This is a follow up of problem <https://www.mathworks.com/matlabcentral/cody/groups/1/problems/45329-castling-01> Given...

26일 전

문제를 풀었습니다


Castling-01
Given the position of only one player's chess pieces(some of them) on the chessboard, figure out whether castling is valid or no...

26일 전

문제를 풀었습니다


Take it out
Consider the integer number sequence N (1 to infinity). After each iteration, take out the (k+1)th elements; where k is the n...

26일 전

문제를 풀었습니다


Abelian Sandpile - 01
Generate a matrix like abelian sandpile where the center of the matrix is n. For example, n=3 out=[0 0 0 0 ...

26일 전

문제를 풀었습니다


Anagram
Given two strings, check whether they're anagrams to each other or not.

26일 전

문제를 풀었습니다


find subscripts from linear index
a matrix and the linear index of an element is given as input. find the subscripts of that element. if linear index=3 , outp...

26일 전

문제를 풀었습니다


Repeat elements of a vector
Repeat each elements of a given vector according to their values. * x=[1,2,1,3] * y=[1,2,2,1,3,3,3]

26일 전

문제를 풀었습니다


Sky full of stars - 03
draw the following pattern with asterisks. For example, for n=6 '************' '***** *****' '**** ****' ...

27일 전

문제를 풀었습니다


ZigZag - 05
Given a matrix, print all its elements in the alpha form. For example - a=[16 2 3 13 5 11 10 8 ...

대략 1개월 전

문제를 풀었습니다


Quarantine Days
In these quarantine days, a list of what Max may do on a typical day is given in a table with the starting hour to ending hour. ...

대략 1개월 전

문제를 풀었습니다


Euclidean inter-point distance matrix
The Euclidean distance between two points in a p-dimensional space is a really common thing to compute in the field of computati...

2개월 전

문제를 풀었습니다


generate the matrix
given a value n (say 4) - generate the matrix like below y= [0 1 2 3 4; -1 0 1 2 ...

2개월 전

더 보기