Getting full control of your papers at any time is crucial to ease your day-to-day tasks and increase your productivity. Achieve any goal with DocHub features for papers management and hassle-free PDF editing. Gain access, adjust and save and incorporate your workflows along with other protected cloud storage.
DocHub provides you with lossless editing, the possibility to work with any format, and safely eSign papers without having searching for a third-party eSignature software. Obtain the most from the file management solutions in one place. Check out all DocHub functions today with your free account.
[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 w