Resuelto


How many ways to write a number
Given two positive numbers n and k, where n>=k. In how many ways can we write n as sum of k positive numbers. Same numbers but d...

1 día hace

Resuelto


Sky full of stars - 01
Draw a right triangle with asterisks of size n. For example, for n=5 '* ' '** ' '*** ' '**** ' ...

1 día hace

Resuelto


String count
given a string 'str', count the number of the followings - * letters * digits * white space * capital letters * smal...

1 día hace

Resuelto


Identify the sequence
Given a row vector, x, return 1 if it is an arithmetic series, or 2 if it is a geometric series. If it is neither, return 0. ...

1 día hace

Resuelto


n-th digit of write-down all numbers
Write down number as 123456789101112131415161718192021222324252627282930... what's the n-th digit? input n and get the digit.

1 día hace

Resuelto


Some tweaks in summation, Can you decode? :)
There are some tweaks in summation that you might observe via test suites Try if you can

1 día hace

Resuelto


PEMDAS test (★★)
Create the function that will return the following expression for x and y. <<https://i.ibb.co/RHWyzrv/Code-Cogs-Eqn-1.gif>> ...

1 día hace

Resuelto


LCM

1 día hace

Resuelto


Rescaling vector
Rescale the entries of a vector x so that it spams [a,b]. The new values should be linearly stretched into the new range. _Ex...

1 día hace

Resuelto


Get the elements of diagonal and antidiagonal for any m-by-n matrix (★★★★)
(copy of prob. 859) In this problem you must submit a solution which returns the diagonal and anti-diagonal elements without ...

1 día hace

Resuelto


Triangle Numbers (★★)
(copy of problem 5) Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3...

1 día hace

Resuelto


Convert number from given base to other base
Convert number from given base to other base. Example 400 in base 5, find equivalent number in base 8, it is 144.

1 día hace

Resuelto


Create a vector with n repeated values of a number x (★★)
If x=3 and n=7 then the vector y would be y=[3 3 3 3 3 3 3]

1 día hace

Resuelto


Create a vector of the first n odd numbers (★)
If n = 10, your program should return a vector y, where y = [1 3 5 7 9 11 13 15 17 19].

1 día hace

Resuelto


Convert to Binary Coded Decimal
Convert from decimal representation to <http://en.wikipedia.org/wiki/Binary-coded_decimal Binary Code Decimal> (or BCD) represen...

1 día hace

Resuelto


Find the nearest prime
Given a positive integer 'n', the task is to find a prime number greater than or equal to 'n'. Example 1 If given 'n' is ...

1 día hace

Resuelto


~~~~~~~ WAVE ~~~~~~~~~
|The WAVE generator| Once upon a time there was a river. 'Sum' was passing by the river. He saw the water of the river that w...

1 día hace

Resuelto


Find all the indices when a value repetition occurs
Find all the sequences of consecutive repeated numbers in a numeric array, returning the indices where each sequence starts and ...

1 día hace

Resuelto


Successive zeros (harder)
The problem is from Problem 45436, <https://www.mathworks.com/matlabcentral/cody/problems/45436-successive-zeros> Suppose n i...

1 día hace

Resuelto


Fibonacci Word
F1='0' F2='1' F3 is the catenation of the previous two. So, F3 = cat(F2,F1)='10'. similarly, F4 = cat(F3,F2)= '101' ...

1 día hace

Resuelto


Abelian Sandpile - 02
Generate a matrix like Abelian Sandpile where the four corner element is n. For example, n=4 [4 3 2 1 ...

1 día hace

Resuelto


ZigZag - 03
Given a matrix of any size, print its elements from the zigzag form of the matrix. For example, a=[1 2 3; 4 5 6; ...

1 día hace

Resuelto


ZigZag - 01
Given a matrix, return the elements that are on the Z form of the matrix. For example - a=[1,2,3; 4,5,6; 7,8,9] ...

1 día hace

Resuelto


$10,000 sequence
Find the nth term of the Hofstadter–Conway sequence and its chaotic cousin. <https://en.wikipedia.org/wiki/Hofstadter_sequenc...

1 día hace

Resuelto


Nodal Voltage of Resistor Ladder Network
* You have a bunch (an even number N) of identical resistors (each R ohms), a good battery (V volts) and a high impedance voltme...

1 día hace

Resuelto


Solve a ballot counting problem

1 día hace

Resuelto


another bullseye
create matrix like below -- for x=2, y=[1 1 1 1 1; 1 2 2 2 1; 1 2 3...

1 día hace

Resuelto


Decoder Ring
You are given a matrix of numbers, your objective is to use the decoder ring to find the hidden message. ex. encoded_messa...

1 día hace

Resuelto


Finding the next number in a number list, are you able to crack it!
So it goes like this, I give a number list and you find the next value! I found a way to do it, just wondering how many other...

1 día hace

Cargar más