In my application, I want to compare floats in two NSMutableArrays - one sorted and the other unsorted - and get some action accordingly that comparison. After each step, I want to remove the first group of floats in the unsorted array and go to next step. However, always get a runtime error "index (0) beyond bounds (0)". What is wrong ? Thanks for help. That is my code.