Community Profile

photo

Khizar


MIT

Con actividad desde 2013

Estadísticas

  • Quiz Master
  • Creator
  • Solver

Ver insignias

Content Feed

Ver por

Problema


Half-Swap
Given a vector with an even number of elements, rearrange it so that the elements in its first half are switched with those i...

más de 10 años hace | 1 | 161 solvers

Resuelto


Half-Swap
Given a vector with an even number of elements, rearrange it so that the elements in its first half are switched with those i...

más de 10 años hace

Problema


A Poker Hand
Texas Hold ‘Em is a classical card game. In this problem, we are concerned with determining the probability of attaining a certa...

más de 10 años hace | 1 | 27 solvers

Resuelto


Program an exclusive OR operation with logical operators
Program an exclusive or operation *without* using the MATLAB function xor. Use logical operators like |, &, ~, ... instead. ...

más de 10 años hace

Resuelto


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

más de 10 años hace

Resuelto


Increment a number, given its digits
Take as input an array of digits (e.g. x = [1 2 3]) and output an array of digits that is that number "incremented" properly, (i...

más de 10 años hace

Resuelto


Parasitic numbers
Test whether the first input x is an n-parasitic number: <http://en.wikipedia.org/wiki/Parasitic_number>. ( _n_ is the second in...

más de 10 años hace

Resuelto


Back to basics 21 - Matrix replicating
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, generate an output matrix that consists o...

más de 10 años hace

Resuelto


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

más de 10 años hace

Resuelto


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

más de 10 años hace

Resuelto


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

más de 10 años hace

Resuelto


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]

más de 10 años hace

Resuelto


Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

más de 10 años hace

Resuelto


Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

más de 10 años hace

Resuelto


Add two numbers
Given a and b, return the sum a+b in c.

más de 10 años hace

Resuelto


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

más de 10 años hace