The challenge is how we can get the numbers that are divisible and factors of two sets
This video shows solution for the above challenge.
The solution is:
Sort the two lists
Get the maximum number from the first list
Get the minimum number from the second list
Iterate between these two numbers
Then check whether the number can be divisible by all elements of the first array
And
is a factor of all the elements of the second array
The total solution is less than 30 lines of code.
#hackerrank cracking the coding interview #hackerrank data structures #hackerrank test
✅ Subscribe my channel if you like it.
In questa pagina del sito puoi guardare il video online Solve HackerRank Coding Challenge in Java | Between Two Sets | Solution della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Technology Professor 10 marzo 2021, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 471 volte e gli è piaciuto 5 spettatori. Buona visione!