[Solved] Find a number pattern in multiple lines of random numbers [closed]


The question itself is interesting imho

As a starting point I would create all possible combinations of the quadruples (?) that might occur and store them as (List Of) INTEGER (because that will allow you to work with bitwise compare). The number of combinations should be (20*19*18*17)/4! => 4845.
Then you convert your input “lines” to integer too. After that, you can simply count the number of occurences of a single “pattern” by checking NumberFromLine & NumberFromList == NumberFromList

Storing the patterns in an integer means: If the number is “1”, you set Bit 0 of the integer to 1. If the number is 7, you set Bit 6 of the integer value to 1 and so on.

I think this should qualify as an “algorithm”, so you just need to code it 😉

2

solved Find a number pattern in multiple lines of random numbers [closed]