The challenge to handle Concert Ticket can consume your time and effort and overwhelm you. But no more - DocHub is here to take the effort out of editing and completing your paperwork. You can forget about spending hours editing, signing, and organizing paperwork and stressing about data security. Our solution provides industry-leading data protection measures, so you don’t need to think twice about trusting us with your privat information.
DocHub works with various data file formats and is accessible across multiple platforms.
[Music] hello today we will be solving this problem its called concert ticket so there are n concert tickets available each with a certain price then end customers arrive one after another each customer announces the maximum price he or she is willing to pay for a ticket and after this they will get a ticket with the nearest possible price such that it does not exceed the maximum price so for each customer we need to find the nearest possible price that is still possible so for example here four con comes first and we need to find the ticket value that is closest to 4 and that does not exceed 4 and the answer is 3. here for 8 the closest value to 8 that does not exceed 8 is 8 thats why the answer here is a and for 3 then the closest value to 3 would be this 3 but we already gave it to 4 so there are no other values that are less than or equal to three thats why the answer is negative one so lets go ahead to the drawing board and think about this problem so lets come lets start wi