• + 0 comments
    static int lagDuration(int h1, int m1, int h2, int m2, int k) {
            // Return an integer denoting the duration of time in minutes by which the clock has been lagging.
            int h = (h1*60) + (k*60)+m1;
            int wh = (h2*60)+m2;
            
            return Math.abs(h-wh);
        }