Resuelto


Matrix Generation.
if input n =1, generate a matrix y = [1]

alrededor de 2 meses hace

Resuelto


Leap Year
According to Gregorian Calender(which is in use now, in many countries),decide whether a given year is a leap year or not. Give...

alrededor de 2 meses hace

Resuelto


Remove Unique Elements
Given a list of integers, we want to keep only the non-unique elements in this list. To do this, we need to remove all the uniqu...

alrededor de 2 meses hace

Resuelto


Interval Compression
Given a set of integers, the task is to create a list of closed intervals where each interval includes its endpoints. For exampl...

alrededor de 2 meses hace

Resuelto


is the number happy?
test is a given integer number is Happy of not? answer 1 if yes or 0 is no

alrededor de 2 meses hace

Resuelto


Conditional transpose II
As in problem 60734, you're given two vectors, x and y, which might be row or a column vectors. Your task is to ensure that y ha...

alrededor de 2 meses hace

Resuelto


Find out next state (NS) of T Flip-Flop.
Find out next state (NS) of T Flip-Flop based on previous state (PS), inputs. Learn more about T Flip-Flop theory here: <htt...

2 meses hace

Resuelto


Sum the Infinite Series
Given that 0 < x and x < 2*pi where x is in radians, write a function [c,s] = infinite_series(x); that returns with the...

2 meses hace

Resuelto


Calculator spelling - Numbers to Letters
Using the numbers on a calculator, and rotating the display 180 degrees, many words can be spelled. In particular, the following...

2 meses hace

Resuelto


cross-section of 3D pyramid
Create 3d pyramid of ones and zeros...where pyramid-part is denoted by ones and outer-part is denoted by zeros..where base is sq...

2 meses hace

Resuelto


Top layer of a 3D pyramid
create a 3D pyramid(x,y,z) of ones(1) and zeros(0)...where pyramid part is denoted by one....nd find the top layer(x,y) of the p...

2 meses hace

Resuelto


Cannibal eating odd and even numbered men
There are N men in a queue. A cannibal eats either all odd-numbered or all even-numbered men in the queue at a time. In the fi...

2 meses hace

Resuelto


Sum! Sum! Sum!
Calculate the sum of the sequence up to nth term >> a,aa,aaa,aaaa,... 2,22,222,2222,... [for a=2]

2 meses hace

Resuelto


Calculator spelling - Letters to Numbers
Using the numbers on a calculator, and rotating the display 180 degrees, many words can be spelled. In particular, the following...

2 meses hace

Resuelto


Check if a year is a leap year or not
Return 1 if a given year is a leap year or 0 if it is not

2 meses hace

Resuelto


Most Frequent Word - 01
Given a document file or a character array, find out the most frequent word in that document. In the case of multiple words -...

2 meses hace

Resuelto


Compute the harmonic numbers
The nth <https://mathworld.wolfram.com/HarmonicNumber.html harmonic number> is defined as the sum of the reciprocals of the inte...

2 meses hace

Resuelto


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

2 meses hace

Resuelto


Calculate the h-index
H-index is a powerful tool for quantifying the scientific contribution of a researcher. H-index is defined as follows (source - ...

2 meses hace

Resuelto


Binary
Given a positive, integer n, create a function that returns the respective binary number in the form of a vector. Example: ...

2 meses hace

Resuelto


Matrix FUN
Given a Matrix M, find out the number of elements of matrix that are divisible by 3. M = [1 2 3;4 5 6;7 8 9]; ou...

2 meses hace

Resuelto


Back to basics 7 - Equal NaNs
Covering some basic topics I haven't seen elsewhere on Cody. Given 2 input variables, output true if they are equal, false ot...

2 meses hace

Resuelto


Encode Me From The Past
Given this input x = 2, 5, 1, 2, 4, 1, 1, 3 output should be (Five 2's, Two 1's, One 4, Three 1's) [2 2 2 2 2 1 1 4 1...

2 meses hace

Resuelto


Count the peaceful queens
In a 5x5 chessboard with a queen of one color (white, say) on the perimeter, one can place 12 black queens on the board such tha...

2 meses hace

Resuelto


Eliminate Polysyllabics: Long live short words!
Given a string s1, return s2 in which all the words with more than one syllable have been removed. To make things simple, we ...

2 meses hace

Resuelto


Concatenate strings
concatenate a variable number of input strings to produce one outputstring

2 meses hace

Resuelto


Morse Code Generator! Try it!
.... . .-.. .-.. --- . ...- . .-. -.-- --- -. . -.-.-- .-.. . - ... -.. --- ... --- -- . -- --...

2 meses hace

Resuelto


Prime number check (★★)
One way to see if a number x is prime is to compute the remainders obtained when dividing x by all integers from 2 to √(x). If x...

2 meses hace

Cargar más