Search⌘ K
AI Features

Feature #3: Meeting Activity

Explore how to implement a function in Kotlin to solve a Zoom meeting activity game. Learn to apply breadth-first search to find the shortest path on stairs where jumps are based on adjacent and equal-value steps. This lesson helps you grasp graph traversal techniques and problem mapping for coding interviews.

Description

A large number of employees across the globe had to switch to working from home during the pandemic as their companies shut offices down. In this situation, Zoom is a popular collaboration tool, and the number of people using Zoom to work from home is increasing daily. Working from home has caused a lot of stress for employees and has made team building challenging for the employer. Employers have introduced several remote activities that help people relax and get to know each other. Zoom wants to play its part in this by providing fun team activities for online meetings. Zoom has decided to introduce mini games that can be played during meetings. One game they are making is a guessing game that is played on a timer. In this game, the user will be shown an image of stairs with n steps numbered from 0 to n - 1. Each step on the stair also has a number written on it. The player’s answer will be the minimum number of steps that a sprite at the bottom of the stairs needs to take to get to the top.

Your task is to implement a function that can find the correct answer given an array, k, containing ...