you give integer array cost costi cost ith step staircase once pay cost climb stepsYou start step index 0 step index 1return minimum cost reach floor example 1input cost 101520output 15explanation you start index 1 pay 15 climb step reach topthe total cost 15example 2input cost 1100111100111001output 6explanation you start index 0 pay 1 climb step reach index 2 pay 1 climb step reach index 4 pay 1 climb step reach index 6 pay 1 climb step reach index 7 pay 1 climb step reach index 9 pay 1 climb step reach topthe total cost 6 constraints2 costlength 10000 costi 999