Answer the question
In order to leave comments, you need to log in
How to hide an element on a site with HTTPS?
I just need to hide one of the blocks through the Google Chrome extension, but the code below seems to be blocked by HTTPS. How can you get around?
document.getElementById('id').style.display = 'none';
Answer the question
In order to leave comments, you need to log in
document.getElementById('id').style.display = 'none';
I see it this way.
We take the original array { 1, 0, 2, 2, 3, 0, 1 }.
The string to be swapped is { 3, 2, 0, 0, 1, 1, 2 }.
We take the first element 3, it is not in place, we are looking for where it should be, we rearrange it.
We get { 1, 2, 0, 0, 3, 1, 2 }, increase the number of permutations used.
Again we look at the first element, it coincided, we look at the second.
And so on until we reach the end.
(there is a feeling that something else needs to be taken into account in order to avoid useless permutations of type 3 to change to 3, and even better - to remove from both arrays the elements that coincide in location, which no longer need to be rearranged)
If, according to the condition of the problem, a situation is possible when the strings do not match at all, then check for the possibility of solving by removing elements from one array from another.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question