in reply to array splitting

This is similar to the "longest increasing subsequence" problem. A very likely "solution" would be to:
  1. create a directed, acyclic graph, connecting numbers that are a distance of 10 or more - this is O(n2)
  2. iteratively, find the longest path start at the lowest number still contained in the graph
  3. each time a path is found, eliminate those numbers and edges from the graph
You could probably use one of the Graph modules.