Solved


Where do the maximum number belongs within a 3-D matrix?
Suppose, you are given two variables a and b as inputs in 2-D format. Find out, where do the maximum number belongs (as output c...

8 days ago

Solved


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

8 days ago

Solved


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

8 days ago

Solved


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

8 days ago

Solved


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

8 days ago

Solved


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.

8 days ago

Solved


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

8 days ago

Solved


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

8 days ago

Solved


LCM

8 days ago

Solved


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

8 days ago

Solved


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

8 days ago

Solved


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

8 days ago

Solved


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.

8 days ago

Solved


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]

8 days ago

Solved


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

8 days ago

Solved


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

8 days ago

Solved


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

8 days ago

Solved


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

8 days ago

Solved


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

8 days ago

Solved


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

8 days ago

Solved


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

8 days ago

Solved


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

8 days ago

Solved


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

8 days ago

Solved


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

8 days ago

Solved


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

8 days ago

Solved


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

8 days ago

Solved


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

8 days ago

Solved


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

8 days ago

Load more