Feature #3: Meeting Activity
Explore how to implement a guessing mini-game for Zoom meetings using breadth-first search and graph theory. This lesson teaches you to find the minimum steps a sprite takes to reach the top of stairs based on step values. Understand how to model the problem as an unweighted graph and optimize node traversal for efficient search. Gain practical skills useful for coding interviews involving real-world scenarios.
We'll cover the following...
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, ...