You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#Given an array of integers, write a method that will pack neighbouring numbers that are the same into the string X:N, where X is the integer value and N is the sequence length.
#For example, this
#packNumbers([5, 5, 5, 7, 7, 3, 4, 7])
#should return
#['5:3', '7:2', 3, 4, 7]
#Please use the "Run code" button to check your code using the provided test cases. (Ignore the extra code before and after the function, this is the setup for running the test cases.)
#Note: the first number in the test cases is the length of the input array.