Community Profile

Michal Balcerek

Wroclaw University of Technology

68 2015 이후 총 참여 횟수

Michal Balcerek's 배지

세부 정보 보기...

참여 게시물
보기 기준

해결됨

Get the length of a given vector
Given a vector x, the output y should equal the length of x.

6년 이하 전

해결됨

Love triangles
Given a vector of lengths [a b c], determines whether a triangle with non-zero area (in two-dimensional Euclidean space, smarty!...

6년 이하 전

해결됨

Given a window, how many subsets of a vector sum positive
Given a vector: [1 0 -1 3 2 -3 1] and a window of 2, A sliding window would find: 1 + 0 = 1 0 - 1 = -1 ...

6년 이하 전

해결됨

The Goldbach Conjecture, Part 2
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

6년 이하 전

해결됨

surface of a spherical planet
you just discovered its circumference, that is the input.

6년 이하 전

해결됨

Is this triangle right-angled?
Given three positive numbers a, b, c, where c is the largest number, return *true* if the triangle with sides a, b and c is righ...

6년 이하 전

해결됨

given 3 sides, find area of this triangle
1:3 -> 0; 3:5 -> 6

6년 이하 전

해결됨

Back to basics 11 - Max Integer
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive integer MATLAB can handle.

6년 이하 전

해결됨

Nearest Numbers
Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

6년 이하 전

해결됨

Solve the Sudoku Row
*Description* A simple yet tedious task occurs near the end of most Sudoku-solving algorithms, computerized or manual. The ta...

6년 이하 전

해결됨

Too mean-spirited
Find the mean of each consecutive pair of numbers in the input row vector. For example, x=[1 2 3] ----> y = [1.5 2.5] x=[1...

6년 이하 전

해결됨

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

6년 이하 전

해결됨

Back to basics 6 - Column Vector
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...

6년 이하 전

해결됨

you just measured its surface area, that is the input.

6년 이하 전

해결됨

Fahrenheit to Celsius using multiple statements
Given a Fahrenheit value F, convert to a Celsius value C. While the equation is C = 5/9 * (F - 32), as an exercise use two state...

6년 이하 전

해결됨

Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

6년 이하 전

해결됨

Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

6년 이하 전

해결됨

Remove the vowels
Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

6년 이하 전

해결됨

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년 이하 전

해결됨

Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

6년 이하 전

해결됨

Sort a list of complex numbers based on far they are from the origin.
Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...

6년 이하 전

해결됨

Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...

6년 이하 전

해결됨

Simple equation: Annual salary
Given an hourly wage, compute an annual salary by multiplying the wage times 40 and times 50, because salary = wage x 40 hours/w...

6년 이하 전

해결됨

Back to basics 8 - Matrix Diagonals
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector of numbers, output a square array with the...

6년 이하 전

해결됨

Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

6년 이하 전

해결됨

Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

6년 이하 전

해결됨

Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

6년 이하 전

해결됨

Project Euler: Problem 1, Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...

6년 이하 전

해결됨

Pascal's Triangle
Given an integer n >= 0, generate the length n+1 row vector representing the n-th row of <http://en.wikipedia.org/wiki/Pascals_t...

6년 이하 전

해결됨

Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

6년 이하 전