I have read multiple posts on here in other languages, however it didn't quite help me.
Let's say I have an array, which could be anything from:
[0,1,2,4,5,6,7,10]
to:
[1194,1195,1199,1299]
What I need to do, is find out what numbers are missing within the sequence. These arrays coulr be out of order too.
Example 1 would result in:
"Missing Frames = 3, 8-9"
Example 2 would result in:
"Missing Frames = 1196-1198, 1200-1298"
Currently, I have found the missing frames, but I can't figure out how to format them like above strings, instead, I'm just building an array.
Here is what I've done so far:
DEMO: http://jsfiddle.net/qBcD6/2/
Any Ideas?