How can I remove this redundancy while finding out patterns in a string in R? -


I have created a code that does something like this:

It finds all the substrings (length For example:

  Input Output "110110110" "110" "110110110110" for example:  

"110" "101" "011" "1010101010101" "1010" "0101" "10" "01"

Now, my code works perfectly and everything is best Works from Now, let's assume that the input string is 1111111111111111 In this case, the output I am getting is as follows: "11111" "1111" "111" "11" The output is also correct, but there are a lot of redundancy here, as you can see for yourself a pattern (11111) already covers what is trying to give information about the next pattern (1111) .

How can I handle this redundancy in any form?


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -