function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Shuhbam SinhaShuhbam Sinha 

find the count of lists that contain the subset of integers

Hello Everyone,
I need to find out  the count of lists that contain the subset of integers thorugh apex.
  • Given a list of list of integres Eg: [[1,2,3],[1,2],[3,4,5],[3,4,5,6]]. 
  • find the count of lists that contain the subset of integers in the given input [3,4].
PriyaPriya (Salesforce Developers) 

Hey shubham,

Can you explain requirement with examples and its outcome ?

Thanks

Priya Ranjan

Shuhbam SinhaShuhbam Sinha
Hello Priya,

Actually this question was asked to me in one interview. If you see the 1st bullet point its a list of list of numbers where [3,4] was occuured twice .So the question was how can I show in the debug log that [3,4] occured twice in this list of list by using system.debug