You are given an integer array representing the heights of buildings, with a certain number of bricks and ladders. Starting from the first building, move to subsequent buildings using either bricks or ladders when going to a taller building. The goal is to determine the furthest building index you can reach with the optimal use of the resources available.
Click Run to execute sample tests.