Please read the new rule regarding the restriction on the use of AI tools. ×

Interval Problem

Revision en2, by rumike, 2024-08-06 05:08:20

Given a list of interval, find the maximum difference between two intervals. The difference between two intervals A and B is the number of element that are in A and not in B, or in B and not in A.

UDP : It mean element that are exactly only in one of A and B

Can it be found in O(n) ?

Tags intervals, complexity

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English rumike 2024-08-06 05:08:20 82
en1 English rumike 2024-08-06 00:43:43 241 Initial revision (published)