1942. The Number of the Smallest Unoccupied Chair | Leetcode Daily Challenge | DSA | Java

Описание к видео 1942. The Number of the Smallest Unoccupied Chair | Leetcode Daily Challenge | DSA | Java

Problem Name:
1942. The Number of the Smallest Unoccupied Chair

Problem Statement:
There is a party where n friends numbered from 0 to n - 1 are attending. There is an infinite number of chairs in this party that are numbered from 0 to infinity. When a friend arrives at the party, they sit on the unoccupied chair with the smallest number.

For example, if chairs 0, 1, and 5 are occupied when a friend comes, they will sit on chair number 2.
When a friend leaves the party, their chair becomes unoccupied at the moment they leave. If another friend arrives at that same moment, they can sit in that chair.

You are given a 0-indexed 2D integer array times where times[i] = [arrivali, leavingi], indicating the arrival and leaving times of the ith friend respectively, and an integer targetFriend. All arrival times are distinct.

Return the chair number that the friend numbered targetFriend will sit on.

Problem Link:
https://leetcode.com/problems/the-num...

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

#ShashwatTiwari #coding​​ #problemsolving​

Комментарии

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