Community Profile

photo

Sofya Belov


Last seen: 21 Tage ago
56 total contributions since 2019

Sofya Belov's Badges

  • Solver

View details...

Contributions in
View by

Solved


Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

etwa 2 Monate ago

Solved


Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

etwa ein Jahr ago

Solved


Make a 1 hot vector
Make a vector of length _N_ that consists of all zeros except at index _k_, where it has the value 1. Example: Input ...

etwa ein Jahr ago

Solved


Eight Queens Solution Checker
Write a function to verify whether an arrangement of queens on a chessboard is a valid solution to the classic <http://en.wikipe...

etwa ein Jahr ago

Solved


Is the input divisible by 3?
Return true if the input is divisible by 3 and false if not.

etwa ein Jahr ago

Solved


Go-style solver
Consider a variation of the game Go where one player has gone ahead and placed several pieces all at once. Assuming that the sec...

etwa ein Jahr ago

Solved


Wheat on a chessboard pt 2
If a chessboard were to have wheat placed upon each square such that x grains were placed on the first square and each successiv...

etwa ein Jahr ago

Solved


collision
several cars (n) were involved in this collision, the input matrix (vm) has n rows and two columns, first column for velocity an...

etwa ein Jahr ago

Solved


Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

etwa ein Jahr ago

Solved


Side of a rhombus
If a rhombus has diagonals of length x and x+1, then what is the length of its side, y? <<http://upload.wikimedia.org/wikipe...

etwa ein Jahr ago

Solved


Rotate a Matrix
Input a Matrix x, Output y is the matrix rotating x 90 degrees clockwise

etwa ein Jahr 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 = ...

etwa ein Jahr ago

Solved


radius of a spherical planet
You just measured its surface area, that is the input.

etwa ein Jahr ago

Solved


If-then-else
Complete the function below such that if the value of x is in the range 10 to 14, inclusive, the value 18 is assigned to y. Oth...

etwa ein Jahr ago

Solved


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

etwa ein Jahr ago

Solved


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

etwa ein Jahr ago

Solved


Cannon Ball
Given g (acceleration due to gravity) and desired altitude x, find the minimum ground velocity of a cannon ball to reach x.

etwa ein Jahr ago

Solved


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

etwa ein Jahr ago

Solved


Derivative of polynomial
Compute the derivative of a given polynomial. The input is an <http://www.mathworks.com/help/matlab/math/representing-polynomial...

etwa ein Jahr ago

Solved


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

etwa ein Jahr ago

Solved


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

etwa ein Jahr ago

Solved


Find the Nth Root of a Given Number
Find the Nth root of a given number x. Examples x = 4096 n = 4 y = 8 x = 625 n = 5 y = 3.6239

etwa ein Jahr ago

Solved


Area of a Square
Inside a square is a circle with radius r. What is the area of the square?

etwa ein Jahr ago

Solved


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

etwa ein Jahr ago

Solved


multiply by three
Given the variable x as your input, multiply it by 3 and put the result equal to y. Examples: Input x = 2 Output y is ...

etwa ein Jahr ago

Solved


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

etwa ein Jahr ago

Solved


Check if number exists in vector
Return 1 if number _a_ exists in vector _b_ otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,...

etwa ein Jahr ago

Solved


Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....

etwa ein Jahr ago

Solved


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Examp...

etwa ein Jahr ago

Solved


Who has power to do everything in this world?
There is only one person who is older than this universe. He is Indian version of Chuck Norris.

etwa ein Jahr ago

Load more