1894. Find the Student that Will Replace the Chalk | math | binary search | Leetcode Daily Challenge

Описание к видео 1894. Find the Student that Will Replace the Chalk | math | binary search | Leetcode Daily Challenge

Problem Name:
1894. Find the Student that Will Replace the Chalk

Problem Statement:
There are n students in a class numbered from 0 to n - 1. The teacher will give each student a problem starting with the student number 0, then the student number 1, and so on until the teacher reaches the student number n - 1. After that, the teacher will restart the process, starting with the student number 0 again.

You are given a 0-indexed integer array chalk and an integer k. There are initially k pieces of chalk. When the student number i is given a problem to solve, they will use chalk[i] pieces of chalk to solve that problem. However, if the current number of chalk pieces is strictly less than chalk[i], then the student number i will be asked to replace the chalk.

Return the index of the student that will replace the chalk pieces.

Problem Link:
https://leetcode.com/problems/find-th...

Solution Link:
https://github.com/Tiwarishashwat/Int...

Graph Playlist:
   • Graph Data Structure Series  

Java Plus DSA Placement Course Playlist:
   • Java and DSA Course Playlist : Online...  

Java Plus DSA Sheet:
https://docs.google.com/spreadsheets/...

Notes:
https://github.com/Tiwarishashwat/Jav...

Telegram Link:
https://shashwattiwari.page.link/tele...

Ultimate Recursion Series Playlist:
   • Recursion and Backtracking Ultimate S...  

Instagram Handle: (@shashwat_tiwari_st)
https://shashwattiwari.page.link/shas...

Samsung Interview Experience:
   • I cracked Samsung | SRIB Interview Ex...  

Company Tags:
Facebook | Amazon | Microsoft | Netflix | Google | LinkedIn | Pega Systems | VMware | Adobe | Samsung

Timestamp:
0:00 - Introduction
1:07 - simulation
3:25 - using modulo and sum
6:27 - code
8:30 - binary search
13:48 - code

#ShashwatTiwari #coding​​ #problemsolving​

Комментарии

Информация по комментариям в разработке