solve Jump Game II using dp with priority_queue