Ticket Counter | GFG POTD | C++ | Java | 2-Methods | Code Kar Lo | Tc:- O(1)



Ticket Counter | GFG POTD | C++ | Java | 2-Methods | Code Kar Lo | Tc:- O(1)

Ticket Counter | GFG POTD | C++ | Java | 2-Methods | Code Kar Lo | Tc:- O(1)

N people from 1 to N are standing in the queue at a movie ticket counter. It is a weird counter, as it distributes tickets to the first K people and then the last K people and again first K people and so on, once a person gets a ticket moves out of the queue. The task is to find the last person to get the ticket.

0:00 Introduction
0:13 Problem Statement
1:13 Brute Approach
8:23 C++ Brute Code
9:44 Java Brute Code
10:34 Optimal Approach
18:38 C++ Code
22:39 Java Code

My DSA Journey:- https://youtu.be/quZBBv12mCQ

How to Earn By GFG Articles:- https://youtu.be/XjvEgkd49Gk

Infosys Coding Questions:- https://youtube.com/playlist?list=PLq3GlRZI14HuZlfpLmVY915bolizB8O2-

Problem Link:-https://practice.geeksforgeeks.org/problems/ticket-counter-2731/1

Code Link:-https://github.com/ShubhamKashyap138/Data-Structure/blob/main/Ticket%20Counter

Playlist Link:-https://youtube.com/playlist?list=PLq3GlRZI14Hui2ILGsfF1Uf2RnbNu9wT3

Linkedin:- https://www.linkedin.com/in/shubham-kashyap-65a29a218/

Instagram:- https://instagram.com/im_shubham_kashyap?igshid=YmMyMTA2M2Y=

My GFG Profile:- https://auth.geeksforgeeks.org/user/shubhamrajput6156/practice

gfg potd
gfg potd today
gfg problem of the day
potd gfg
potd
potd today
gfg

#dsa #datastructures #algorithm #gfg #potd #coding #array #strings #tree #binarysearchtree #codekarlo #dynamicprogramming

Comments are closed.