Given a vector x, find the "counting sequence" y.
A counting sequence is formed by "counting" the entries in a given sequence.
For example, the sequence
x = 5, 5, 2, 1, 1, 1, 1, 3
can be read as
Two 5's, one 2, four 1's, one 3
which translates to
y = 2, 5, 1, 2, 4, 1, 1, 3
So y is the counting sequence for x.
For this problem, all elements in the sequences x and y will be in the range from 1 to 9.
Increment a number, given its digits
468 Solvers
134 Solvers
Back to basics 19 - character types
176 Solvers
Find nearest prime number less than input number
123 Solvers
261 Solvers
MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Learn moreOpportunities for recent engineering grads.
Apply Today