Add Minimum Number of Rungs
You are given a sorted integer array rungs representing the positions of the rungs on a ladder. The ladder consists of rungs at positions rungs[i] and rungs[i+1] where 0 <= i < rungs.length. You are also given an integer dist.
Return the minimum number of rungs that must be added to the ladder in order to make it so you can climb to the top.
Each rung must be a positive integer equal to the difference between consecutive rungs on the ladder.
Ada AI
I want to discuss a solution
Help me solve this
Give more examples
What's wrong with my code?
How to use 'for loop' in javascript?
javascript (node 13.12.0)