Solution: Check if Lists are Disjoint

Let’s solve the Check if Lists are Disjoint problem.

We'll cover the following


Given two lists, determine whether or not they are disjoint.

Note: Lists are disjoint if they have no common element between them.


  • 11 \leq list1.length,list2.length 103\leq 10^3
  • 105-10^5 \leq lst[i] 105\leq 10^5


Level up your interview prep. Join Educative to access 70+ hands-on prep courses.