I want to find the smallest sequence of numbers that are repeated in a given array.

Example: 1, 2, -2, 1, 2, -2, 1, 2, should output 3 because "1, 2, -2" is repeated

Example 2: 1, 2, 1, should output 2 because "1, 2" is repeated

Skip to content
# Finding the smallest sequence of numbers that repeat

Proxies-free.com: 100% Free Daily Proxy Lists Every Day!

Get Free Proxies Every Day

I want to find the smallest sequence of numbers that are repeated in a given array.

Example: 1, 2, -2, 1, 2, -2, 1, 2, should output 3 because "1, 2, -2" is repeated

Example 2: 1, 2, 1, should output 2 because "1, 2" is repeated

DreamProxies - Cheapest USA Elite Private Proxies
100 Private Proxies
200 Private Proxies
400 Private Proxies
1000 Private Proxies
2000 Private Proxies
ExtraProxies.com - Buy Cheap Private Proxies
Buy 50 Private Proxies
Buy 100 Private Proxies
Buy 200 Private Proxies
Buy 500 Private Proxies
Buy 1000 Private Proxies
Buy 2000 Private Proxies
ProxiesLive
Proxies-free.com
New Proxy Lists Every Day
Proxies123