split array algorithms