Given N appointments, find the conflicting appointments

1 min read

https://www.geeksforgeeks.org/given-n-appointments-find-conflicting-appointments/

Replace every element with the least greater element on its right
Check preorder is valid